1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Remove obsolete internal functions istrue, isfalse, isnottrue, isnotfalse,

nullvalue, nonvalue.  A long time ago, these were used to implement the SQL
constructs IS TRUE, etc.
This commit is contained in:
Peter Eisentraut
2008-10-05 17:33:17 +00:00
parent d112ead206
commit 2cf8afe5d1
5 changed files with 6 additions and 111 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/bool.c,v 1.43 2008/03/25 22:42:43 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/bool.c,v 1.44 2008/10/05 17:33:16 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -221,69 +221,6 @@ boolge(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(arg1 >= arg2);
}
/*
* Per SQL92, istrue() and isfalse() should return false, not NULL,
* when presented a NULL input (since NULL is our implementation of
* UNKNOWN). Conversely isnottrue() and isnotfalse() should return true.
* Therefore, these routines are all declared not-strict in pg_proc
* and must do their own checking for null inputs.
*
* Note we don't need isunknown() and isnotunknown() functions, since
* nullvalue() and nonnullvalue() will serve.
*/
Datum
istrue(PG_FUNCTION_ARGS)
{
bool b;
if (PG_ARGISNULL(0))
PG_RETURN_BOOL(false);
b = PG_GETARG_BOOL(0);
PG_RETURN_BOOL(b);
}
Datum
isfalse(PG_FUNCTION_ARGS)
{
bool b;
if (PG_ARGISNULL(0))
PG_RETURN_BOOL(false);
b = PG_GETARG_BOOL(0);
PG_RETURN_BOOL(!b);
}
Datum
isnottrue(PG_FUNCTION_ARGS)
{
bool b;
if (PG_ARGISNULL(0))
PG_RETURN_BOOL(true);
b = PG_GETARG_BOOL(0);
PG_RETURN_BOOL(!b);
}
Datum
isnotfalse(PG_FUNCTION_ARGS)
{
bool b;
if (PG_ARGISNULL(0))
PG_RETURN_BOOL(true);
b = PG_GETARG_BOOL(0);
PG_RETURN_BOOL(b);
}
/*
* boolean-and and boolean-or aggregates.
*/