mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Add "xid <> xid" and "xid <> int4" operators.
The corresponding "=" operators have been there a long time, and not having their negators is a bit of a nuisance. Michael Paquier
This commit is contained in:
@ -87,6 +87,18 @@ xideq(PG_FUNCTION_ARGS)
|
|||||||
PG_RETURN_BOOL(TransactionIdEquals(xid1, xid2));
|
PG_RETURN_BOOL(TransactionIdEquals(xid1, xid2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xidneq - are two xids different?
|
||||||
|
*/
|
||||||
|
Datum
|
||||||
|
xidneq(PG_FUNCTION_ARGS)
|
||||||
|
{
|
||||||
|
TransactionId xid1 = PG_GETARG_TRANSACTIONID(0);
|
||||||
|
TransactionId xid2 = PG_GETARG_TRANSACTIONID(1);
|
||||||
|
|
||||||
|
PG_RETURN_BOOL(!TransactionIdEquals(xid1, xid2));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xid_age - compute age of an XID (relative to latest stable xid)
|
* xid_age - compute age of an XID (relative to latest stable xid)
|
||||||
*/
|
*/
|
||||||
|
@ -53,6 +53,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 201510161
|
#define CATALOG_VERSION_NO 201511071
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -144,10 +144,14 @@ DESCR("prepend element onto front of array");
|
|||||||
DATA(insert OID = 375 ( "||" PGNSP PGUID b f f 2277 2277 2277 0 0 array_cat - - ));
|
DATA(insert OID = 375 ( "||" PGNSP PGUID b f f 2277 2277 2277 0 0 array_cat - - ));
|
||||||
DESCR("concatenate");
|
DESCR("concatenate");
|
||||||
|
|
||||||
DATA(insert OID = 352 ( "=" PGNSP PGUID b f t 28 28 16 352 0 xideq eqsel eqjoinsel ));
|
DATA(insert OID = 352 ( "=" PGNSP PGUID b f t 28 28 16 352 3315 xideq eqsel eqjoinsel ));
|
||||||
DESCR("equal");
|
DESCR("equal");
|
||||||
DATA(insert OID = 353 ( "=" PGNSP PGUID b f f 28 23 16 0 0 xideqint4 eqsel eqjoinsel ));
|
DATA(insert OID = 353 ( "=" PGNSP PGUID b f f 28 23 16 0 3316 xideqint4 eqsel eqjoinsel ));
|
||||||
DESCR("equal");
|
DESCR("equal");
|
||||||
|
DATA(insert OID = 3315 ( "<>" PGNSP PGUID b f f 28 28 16 3315 352 xidneq neqsel neqjoinsel ));
|
||||||
|
DESCR("not equal");
|
||||||
|
DATA(insert OID = 3316 ( "<>" PGNSP PGUID b f f 28 23 16 0 353 xidneqint4 neqsel neqjoinsel ));
|
||||||
|
DESCR("not equal");
|
||||||
DATA(insert OID = 388 ( "!" PGNSP PGUID r f f 20 0 1700 0 0 numeric_fac - - ));
|
DATA(insert OID = 388 ( "!" PGNSP PGUID r f f 20 0 1700 0 0 numeric_fac - - ));
|
||||||
DESCR("factorial");
|
DESCR("factorial");
|
||||||
DATA(insert OID = 389 ( "!!" PGNSP PGUID l f f 0 20 1700 0 0 numeric_fac - - ));
|
DATA(insert OID = 389 ( "!!" PGNSP PGUID l f f 0 20 1700 0 0 numeric_fac - - ));
|
||||||
|
@ -212,6 +212,7 @@ DATA(insert OID = 65 ( int4eq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0
|
|||||||
DATA(insert OID = 66 ( int4lt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "23 23" _null_ _null_ _null_ _null_ _null_ int4lt _null_ _null_ _null_ ));
|
DATA(insert OID = 66 ( int4lt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "23 23" _null_ _null_ _null_ _null_ _null_ int4lt _null_ _null_ _null_ ));
|
||||||
DATA(insert OID = 67 ( texteq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "25 25" _null_ _null_ _null_ _null_ _null_ texteq _null_ _null_ _null_ ));
|
DATA(insert OID = 67 ( texteq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "25 25" _null_ _null_ _null_ _null_ _null_ texteq _null_ _null_ _null_ ));
|
||||||
DATA(insert OID = 68 ( xideq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "28 28" _null_ _null_ _null_ _null_ _null_ xideq _null_ _null_ _null_ ));
|
DATA(insert OID = 68 ( xideq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "28 28" _null_ _null_ _null_ _null_ _null_ xideq _null_ _null_ _null_ ));
|
||||||
|
DATA(insert OID = 3308 ( xidneq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "28 28" _null_ _null_ _null_ _null_ _null_ xidneq _null_ _null_ _null_ ));
|
||||||
DATA(insert OID = 69 ( cideq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "29 29" _null_ _null_ _null_ _null_ _null_ cideq _null_ _null_ _null_ ));
|
DATA(insert OID = 69 ( cideq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "29 29" _null_ _null_ _null_ _null_ _null_ cideq _null_ _null_ _null_ ));
|
||||||
DATA(insert OID = 70 ( charne PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "18 18" _null_ _null_ _null_ _null_ _null_ charne _null_ _null_ _null_ ));
|
DATA(insert OID = 70 ( charne PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "18 18" _null_ _null_ _null_ _null_ _null_ charne _null_ _null_ _null_ ));
|
||||||
DATA(insert OID = 1246 ( charlt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "18 18" _null_ _null_ _null_ _null_ _null_ charlt _null_ _null_ _null_ ));
|
DATA(insert OID = 1246 ( charlt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "18 18" _null_ _null_ _null_ _null_ _null_ charlt _null_ _null_ _null_ ));
|
||||||
@ -1515,6 +1516,7 @@ DATA(insert OID = 1318 ( length PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2
|
|||||||
DESCR("character length");
|
DESCR("character length");
|
||||||
|
|
||||||
DATA(insert OID = 1319 ( xideqint4 PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "28 23" _null_ _null_ _null_ _null_ _null_ xideq _null_ _null_ _null_ ));
|
DATA(insert OID = 1319 ( xideqint4 PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "28 23" _null_ _null_ _null_ _null_ _null_ xideq _null_ _null_ _null_ ));
|
||||||
|
DATA(insert OID = 3309 ( xidneqint4 PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "28 23" _null_ _null_ _null_ _null_ _null_ xidneq _null_ _null_ _null_ ));
|
||||||
|
|
||||||
DATA(insert OID = 1326 ( interval_div PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1186 "1186 701" _null_ _null_ _null_ _null_ _null_ interval_div _null_ _null_ _null_ ));
|
DATA(insert OID = 1326 ( interval_div PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1186 "1186 701" _null_ _null_ _null_ _null_ _null_ interval_div _null_ _null_ _null_ ));
|
||||||
|
|
||||||
|
@ -860,6 +860,7 @@ extern Datum xidout(PG_FUNCTION_ARGS);
|
|||||||
extern Datum xidrecv(PG_FUNCTION_ARGS);
|
extern Datum xidrecv(PG_FUNCTION_ARGS);
|
||||||
extern Datum xidsend(PG_FUNCTION_ARGS);
|
extern Datum xidsend(PG_FUNCTION_ARGS);
|
||||||
extern Datum xideq(PG_FUNCTION_ARGS);
|
extern Datum xideq(PG_FUNCTION_ARGS);
|
||||||
|
extern Datum xidneq(PG_FUNCTION_ARGS);
|
||||||
extern Datum xid_age(PG_FUNCTION_ARGS);
|
extern Datum xid_age(PG_FUNCTION_ARGS);
|
||||||
extern Datum mxid_age(PG_FUNCTION_ARGS);
|
extern Datum mxid_age(PG_FUNCTION_ARGS);
|
||||||
extern int xidComparator(const void *arg1, const void *arg2);
|
extern int xidComparator(const void *arg1, const void *arg2);
|
||||||
|
@ -641,6 +641,8 @@ uuid_eq(uuid,uuid)
|
|||||||
uuid_ge(uuid,uuid)
|
uuid_ge(uuid,uuid)
|
||||||
uuid_gt(uuid,uuid)
|
uuid_gt(uuid,uuid)
|
||||||
uuid_ne(uuid,uuid)
|
uuid_ne(uuid,uuid)
|
||||||
|
xidneq(xid,xid)
|
||||||
|
xidneqint4(xid,integer)
|
||||||
-- restore normal output mode
|
-- restore normal output mode
|
||||||
\a\t
|
\a\t
|
||||||
-- List of functions used by libpq's fe-lobj.c
|
-- List of functions used by libpq's fe-lobj.c
|
||||||
|
Reference in New Issue
Block a user