Add routines istrue() and isfalse() to directly evaluate boolean type.

This commit is contained in:
Thomas G. Lockhart 1997-10-30 16:45:12 +00:00
parent 770352d279
commit cc1b420cfd
3 changed files with 20 additions and 3 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.9 1997/10/25 05:09:58 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.10 1997/10/30 16:45:12 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -116,3 +116,15 @@ boolgt(bool arg1, bool arg2)
{
return (arg1 > arg2);
}
bool
istrue(bool arg1)
{
return(arg1 == TRUE);
} /* istrue() */
bool
isfalse(bool arg1)
{
return(arg1 != TRUE);
} /* istrue() */

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.32 1997/10/25 05:29:48 thomas Exp $
* $Id: pg_proc.h,v 1.33 1997/10/30 16:44:06 thomas Exp $
*
* NOTES
* 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
DATA(insert OID = 948 ( oidnamecmp PGUID 11 f t f 2 f 23 "911 911" 100 0 0 100 foo bar));
DATA(insert OID = 949 ( mkoidname PGUID 11 f t f 2 f 911 "26 19" 100 0 0 100 foo bar));
DATA(insert OID = 950 ( istrue PGUID 11 f t f 1 f 16 "16" 100 0 0 100 foo bar ));
DATA(insert OID = 951 ( isfalse PGUID 11 f t f 1 f 16 "16" 100 0 0 100 foo bar ));
DATA(insert OID = 952 ( lo_open PGUID 11 f t f 2 f 23 "26 23" 100 0 0 100 foo bar ));
DATA(insert OID = 953 ( lo_close PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar ));
DATA(insert OID = 954 ( loread PGUID 11 f t f 2 f 17 "23 23" 100 0 0 100 foo bar ));

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.28 1997/10/25 05:40:43 thomas Exp $
* $Id: builtins.h,v 1.29 1997/10/30 16:42:50 thomas Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
@ -35,6 +35,8 @@ extern bool booleq(bool arg1, bool arg2);
extern bool boolne(bool arg1, bool arg2);
extern bool boollt(bool arg1, bool arg2);
extern bool boolgt(bool arg1, bool arg2);
extern bool istrue(bool arg1);
extern bool isfalse(bool arg1);
/* char.c */
extern int32 charin(char *ch);