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

Commit2cf8afe

Browse files
committed
Remove obsolete internal functions istrue, isfalse, isnottrue, isnotfalse,
nullvalue, nonvalue. A long time ago, these were used to implement the SQLconstructs IS TRUE, etc.
1 parentd112ead commit2cf8afe

File tree

5 files changed

+6
-111
lines changed

5 files changed

+6
-111
lines changed

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

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/bool.c,v 1.43 2008/03/25 22:42:43 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/bool.c,v 1.44 2008/10/05 17:33:16 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -221,69 +221,6 @@ boolge(PG_FUNCTION_ARGS)
221221
PG_RETURN_BOOL(arg1 >=arg2);
222222
}
223223

224-
/*
225-
* Per SQL92, istrue() and isfalse() should return false, not NULL,
226-
* when presented a NULL input (since NULL is our implementation of
227-
* UNKNOWN). Conversely isnottrue() and isnotfalse() should return true.
228-
* Therefore, these routines are all declared not-strict in pg_proc
229-
* and must do their own checking for null inputs.
230-
*
231-
* Note we don't need isunknown() and isnotunknown() functions, since
232-
* nullvalue() and nonnullvalue() will serve.
233-
*/
234-
235-
Datum
236-
istrue(PG_FUNCTION_ARGS)
237-
{
238-
boolb;
239-
240-
if (PG_ARGISNULL(0))
241-
PG_RETURN_BOOL(false);
242-
243-
b=PG_GETARG_BOOL(0);
244-
245-
PG_RETURN_BOOL(b);
246-
}
247-
248-
Datum
249-
isfalse(PG_FUNCTION_ARGS)
250-
{
251-
boolb;
252-
253-
if (PG_ARGISNULL(0))
254-
PG_RETURN_BOOL(false);
255-
256-
b=PG_GETARG_BOOL(0);
257-
258-
PG_RETURN_BOOL(!b);
259-
}
260-
261-
Datum
262-
isnottrue(PG_FUNCTION_ARGS)
263-
{
264-
boolb;
265-
266-
if (PG_ARGISNULL(0))
267-
PG_RETURN_BOOL(true);
268-
269-
b=PG_GETARG_BOOL(0);
270-
271-
PG_RETURN_BOOL(!b);
272-
}
273-
274-
Datum
275-
isnotfalse(PG_FUNCTION_ARGS)
276-
{
277-
boolb;
278-
279-
if (PG_ARGISNULL(0))
280-
PG_RETURN_BOOL(true);
281-
282-
b=PG_GETARG_BOOL(0);
283-
284-
PG_RETURN_BOOL(b);
285-
}
286-
287224
/*
288225
* boolean-and and boolean-or aggregates.
289226
*/

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

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.63 2008/07/03 20:58:46 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.64 2008/10/05 17:33:16 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -36,28 +36,6 @@
3636
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
3737

3838

39-
/*
40-
* Check if data is Null
41-
*/
42-
Datum
43-
nullvalue(PG_FUNCTION_ARGS)
44-
{
45-
if (PG_ARGISNULL(0))
46-
PG_RETURN_BOOL(true);
47-
PG_RETURN_BOOL(false);
48-
}
49-
50-
/*
51-
* Check if data is not Null
52-
*/
53-
Datum
54-
nonnullvalue(PG_FUNCTION_ARGS)
55-
{
56-
if (PG_ARGISNULL(0))
57-
PG_RETURN_BOOL(false);
58-
PG_RETURN_BOOL(true);
59-
}
60-
6139
/*
6240
* current_database()
6341
*Expose the current database to the user

‎src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.492 2008/10/04 21:56:54 tgl Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.493 2008/10/05 17:33:16 petere Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200810041
56+
#defineCATALOG_VERSION_NO200810051
5757

5858
#endif

‎src/include/catalog/pg_proc.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.516 2008/10/03 07:33:09 heikki Exp $
10+
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.517 2008/10/05 17:33:16 petere Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1189,11 +1189,6 @@ DESCR("convert text to char");
11891189
DATA(insertOID=946 (textPGNSPPGUID12100fftfi125"18"_null__null__null_char_text_null__null__null_ ));
11901190
DESCR("convert char to text");
11911191

1192-
DATA(insertOID=950 (istruePGNSPPGUID12100ffffi116"16"_null__null__null_istrue_null__null__null_ ));
1193-
DESCR("bool is true (not false or unknown)");
1194-
DATA(insertOID=951 (isfalsePGNSPPGUID12100ffffi116"16"_null__null__null_isfalse_null__null__null_ ));
1195-
DESCR("bool is false (not true or unknown)");
1196-
11971192
DATA(insertOID=952 (lo_openPGNSPPGUID12100fftfv223"26 23"_null__null__null_lo_open_null__null__null_ ));
11981193
DESCR("large object open");
11991194
DATA(insertOID=953 (lo_closePGNSPPGUID12100fftfv123"23"_null__null__null_lo_close_null__null__null_ ));
@@ -1285,10 +1280,6 @@ DESCR("equal");
12851280
DATA(insertOID=1026 (timezonePGNSPPGUID12100fftfi21114"1186 1184"_null__null__null_timestamptz_izone_null__null__null_ ));
12861281
DESCR("adjust timestamp to new time zone");
12871282

1288-
DATA(insertOID=1029 (nullvaluePGNSPPGUID12100ffffi116"2276"_null__null__null_nullvalue_null__null__null_ ));
1289-
DESCR("(internal)");
1290-
DATA(insertOID=1030 (nonnullvaluePGNSPPGUID12100ffffi116"2276"_null__null__null_nonnullvalue_null__null__null_ ));
1291-
DESCR("(internal)");
12921283
DATA(insertOID=1031 (acliteminPGNSPPGUID12100fftfs11033"2275"_null__null__null_aclitemin_null__null__null_ ));
12931284
DESCR("I/O");
12941285
DATA(insertOID=1032 (aclitemoutPGNSPPGUID12100fftfs12275"1033"_null__null__null_aclitemout_null__null__null_ ));
@@ -1840,11 +1831,6 @@ DESCR("horizontal?");
18401831
DATA(insertOID=1416 (pointPGNSPPGUID12100fftfi1600"718"_null__null__null_circle_center_null__null__null_ ));
18411832
DESCR("center of");
18421833

1843-
DATA(insertOID=1417 (isnottruePGNSPPGUID12100ffffi116"16"_null__null__null_isnottrue_null__null__null_ ));
1844-
DESCR("bool is not true (ie, false or unknown)");
1845-
DATA(insertOID=1418 (isnotfalsePGNSPPGUID12100ffffi116"16"_null__null__null_isnotfalse_null__null__null_ ));
1846-
DESCR("bool is not false (ie, true or unknown)");
1847-
18481834
DATA(insertOID=1419 (timePGNSPPGUID12100fftfi11083"1186"_null__null__null_interval_time_null__null__null_ ));
18491835
DESCR("convert interval to time");
18501836

‎src/include/utils/builtins.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.321 2008/10/03 07:33:10 heikki Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.322 2008/10/05 17:33:17 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -77,10 +77,6 @@ extern Datum boollt(PG_FUNCTION_ARGS);
7777
externDatumboolgt(PG_FUNCTION_ARGS);
7878
externDatumboolle(PG_FUNCTION_ARGS);
7979
externDatumboolge(PG_FUNCTION_ARGS);
80-
externDatumistrue(PG_FUNCTION_ARGS);
81-
externDatumisfalse(PG_FUNCTION_ARGS);
82-
externDatumisnottrue(PG_FUNCTION_ARGS);
83-
externDatumisnotfalse(PG_FUNCTION_ARGS);
8480
externDatumbooland_statefunc(PG_FUNCTION_ARGS);
8581
externDatumboolor_statefunc(PG_FUNCTION_ARGS);
8682

@@ -399,8 +395,6 @@ extern Datum pg_read_file(PG_FUNCTION_ARGS);
399395
externDatumpg_ls_dir(PG_FUNCTION_ARGS);
400396

401397
/* misc.c */
402-
externDatumnullvalue(PG_FUNCTION_ARGS);
403-
externDatumnonnullvalue(PG_FUNCTION_ARGS);
404398
externDatumcurrent_database(PG_FUNCTION_ARGS);
405399
externDatumcurrent_query(PG_FUNCTION_ARGS);
406400
externDatumpg_cancel_backend(PG_FUNCTION_ARGS);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp