1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +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:
Tom Lane
2015-11-07 16:40:15 -05:00
parent 9042f58342
commit c5e86ea932
6 changed files with 24 additions and 3 deletions

View File

@@ -87,6 +87,18 @@ xideq(PG_FUNCTION_ARGS)
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)
*/