mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08: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:
parent
d112ead206
commit
2cf8afe5d1
@ -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.
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.63 2008/07/03 20:58:46 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.64 2008/10/05 17:33:16 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -36,28 +36,6 @@
|
||||
#define atooid(x) ((Oid) strtoul((x), NULL, 10))
|
||||
|
||||
|
||||
/*
|
||||
* Check if data is Null
|
||||
*/
|
||||
Datum
|
||||
nullvalue(PG_FUNCTION_ARGS)
|
||||
{
|
||||
if (PG_ARGISNULL(0))
|
||||
PG_RETURN_BOOL(true);
|
||||
PG_RETURN_BOOL(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if data is not Null
|
||||
*/
|
||||
Datum
|
||||
nonnullvalue(PG_FUNCTION_ARGS)
|
||||
{
|
||||
if (PG_ARGISNULL(0))
|
||||
PG_RETURN_BOOL(false);
|
||||
PG_RETURN_BOOL(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* current_database()
|
||||
* Expose the current database to the user
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.492 2008/10/04 21:56:54 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.493 2008/10/05 17:33:16 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 200810041
|
||||
#define CATALOG_VERSION_NO 200810051
|
||||
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.516 2008/10/03 07:33:09 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.517 2008/10/05 17:33:16 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The script catalog/genbki.sh reads this file and generates .bki
|
||||
@ -1189,11 +1189,6 @@ DESCR("convert text to char");
|
||||
DATA(insert OID = 946 ( text PGNSP PGUID 12 1 0 0 f f t f i 1 25 "18" _null_ _null_ _null_ char_text _null_ _null_ _null_ ));
|
||||
DESCR("convert char to text");
|
||||
|
||||
DATA(insert OID = 950 ( istrue PGNSP PGUID 12 1 0 0 f f f f i 1 16 "16" _null_ _null_ _null_ istrue _null_ _null_ _null_ ));
|
||||
DESCR("bool is true (not false or unknown)");
|
||||
DATA(insert OID = 951 ( isfalse PGNSP PGUID 12 1 0 0 f f f f i 1 16 "16" _null_ _null_ _null_ isfalse _null_ _null_ _null_ ));
|
||||
DESCR("bool is false (not true or unknown)");
|
||||
|
||||
DATA(insert OID = 952 ( lo_open PGNSP PGUID 12 1 0 0 f f t f v 2 23 "26 23" _null_ _null_ _null_ lo_open _null_ _null_ _null_ ));
|
||||
DESCR("large object open");
|
||||
DATA(insert OID = 953 ( lo_close PGNSP PGUID 12 1 0 0 f f t f v 1 23 "23" _null_ _null_ _null_ lo_close _null_ _null_ _null_ ));
|
||||
@ -1285,10 +1280,6 @@ DESCR("equal");
|
||||
DATA(insert OID = 1026 ( timezone PGNSP PGUID 12 1 0 0 f f t f i 2 1114 "1186 1184" _null_ _null_ _null_ timestamptz_izone _null_ _null_ _null_ ));
|
||||
DESCR("adjust timestamp to new time zone");
|
||||
|
||||
DATA(insert OID = 1029 ( nullvalue PGNSP PGUID 12 1 0 0 f f f f i 1 16 "2276" _null_ _null_ _null_ nullvalue _null_ _null_ _null_ ));
|
||||
DESCR("(internal)");
|
||||
DATA(insert OID = 1030 ( nonnullvalue PGNSP PGUID 12 1 0 0 f f f f i 1 16 "2276" _null_ _null_ _null_ nonnullvalue _null_ _null_ _null_ ));
|
||||
DESCR("(internal)");
|
||||
DATA(insert OID = 1031 ( aclitemin PGNSP PGUID 12 1 0 0 f f t f s 1 1033 "2275" _null_ _null_ _null_ aclitemin _null_ _null_ _null_ ));
|
||||
DESCR("I/O");
|
||||
DATA(insert OID = 1032 ( aclitemout PGNSP PGUID 12 1 0 0 f f t f s 1 2275 "1033" _null_ _null_ _null_ aclitemout _null_ _null_ _null_ ));
|
||||
@ -1840,11 +1831,6 @@ DESCR("horizontal?");
|
||||
DATA(insert OID = 1416 ( point PGNSP PGUID 12 1 0 0 f f t f i 1 600 "718" _null_ _null_ _null_ circle_center _null_ _null_ _null_ ));
|
||||
DESCR("center of");
|
||||
|
||||
DATA(insert OID = 1417 ( isnottrue PGNSP PGUID 12 1 0 0 f f f f i 1 16 "16" _null_ _null_ _null_ isnottrue _null_ _null_ _null_ ));
|
||||
DESCR("bool is not true (ie, false or unknown)");
|
||||
DATA(insert OID = 1418 ( isnotfalse PGNSP PGUID 12 1 0 0 f f f f i 1 16 "16" _null_ _null_ _null_ isnotfalse _null_ _null_ _null_ ));
|
||||
DESCR("bool is not false (ie, true or unknown)");
|
||||
|
||||
DATA(insert OID = 1419 ( time PGNSP PGUID 12 1 0 0 f f t f i 1 1083 "1186" _null_ _null_ _null_ interval_time _null_ _null_ _null_ ));
|
||||
DESCR("convert interval to time");
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.321 2008/10/03 07:33:10 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.322 2008/10/05 17:33:17 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -77,10 +77,6 @@ extern Datum boollt(PG_FUNCTION_ARGS);
|
||||
extern Datum boolgt(PG_FUNCTION_ARGS);
|
||||
extern Datum boolle(PG_FUNCTION_ARGS);
|
||||
extern Datum boolge(PG_FUNCTION_ARGS);
|
||||
extern Datum istrue(PG_FUNCTION_ARGS);
|
||||
extern Datum isfalse(PG_FUNCTION_ARGS);
|
||||
extern Datum isnottrue(PG_FUNCTION_ARGS);
|
||||
extern Datum isnotfalse(PG_FUNCTION_ARGS);
|
||||
extern Datum booland_statefunc(PG_FUNCTION_ARGS);
|
||||
extern Datum boolor_statefunc(PG_FUNCTION_ARGS);
|
||||
|
||||
@ -399,8 +395,6 @@ extern Datum pg_read_file(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_ls_dir(PG_FUNCTION_ARGS);
|
||||
|
||||
/* misc.c */
|
||||
extern Datum nullvalue(PG_FUNCTION_ARGS);
|
||||
extern Datum nonnullvalue(PG_FUNCTION_ARGS);
|
||||
extern Datum current_database(PG_FUNCTION_ARGS);
|
||||
extern Datum current_query(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_cancel_backend(PG_FUNCTION_ARGS);
|
||||
|
Loading…
Reference in New Issue
Block a user