Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc1b420

Browse files
author
Thomas G. Lockhart
committed
Add routines istrue() and isfalse() to directly evaluate boolean type.
1 parent770352d commitcc1b420

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

‎src/backend/utils/adt/bool.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.9 1997/10/25 05:09:58 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.10 1997/10/30 16:45:12 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -116,3 +116,15 @@ boolgt(bool arg1, bool arg2)
116116
{
117117
return (arg1>arg2);
118118
}
119+
120+
bool
121+
istrue(boolarg1)
122+
{
123+
return(arg1== TRUE);
124+
}/* istrue() */
125+
126+
bool
127+
isfalse(boolarg1)
128+
{
129+
return(arg1!= TRUE);
130+
}/* istrue() */

‎src/include/catalog/pg_proc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_proc.h,v 1.32 1997/10/25 05:29:48 thomas Exp $
9+
* $Id: pg_proc.h,v 1.33 1997/10/30 16:44:06 thomas Exp $
1010
*
1111
* NOTES
1212
* The script catalog/genbki.sh reads this file and generates .bki
@@ -729,6 +729,9 @@ DATA(insert OID = 947 ( oidnamene PGUID 11 f t f 2 f 16 "911 911" 100 0 0 1
729729
DATA(insertOID=948 (oidnamecmpPGUID11ftf2f23"911 911"10000100foobar));
730730
DATA(insertOID=949 (mkoidnamePGUID11ftf2f911"26 19"10000100foobar));
731731

732+
DATA(insertOID=950 (istruePGUID11ftf1f16"16"10000100foobar ));
733+
DATA(insertOID=951 (isfalsePGUID11ftf1f16"16"10000100foobar ));
734+
732735
DATA(insertOID=952 (lo_openPGUID11ftf2f23"26 23"10000100foobar ));
733736
DATA(insertOID=953 (lo_closePGUID11ftf1f23"23"10000100foobar ));
734737
DATA(insertOID=954 (loreadPGUID11ftf2f17"23 23"10000100foobar ));

‎src/include/utils/builtins.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: builtins.h,v 1.28 1997/10/25 05:40:43 thomas Exp $
9+
* $Id: builtins.h,v 1.29 1997/10/30 16:42:50 thomas Exp $
1010
*
1111
* NOTES
1212
* This should normally only be included by fmgr.h.
@@ -35,6 +35,8 @@ extern bool booleq(bool arg1, bool arg2);
3535
externboolboolne(boolarg1,boolarg2);
3636
externboolboollt(boolarg1,boolarg2);
3737
externboolboolgt(boolarg1,boolarg2);
38+
externboolistrue(boolarg1);
39+
externboolisfalse(boolarg1);
3840

3941
/* char.c */
4042
externint32charin(char*ch);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp