1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Add a pg_lsn data type, to represent an LSN.

Robert Haas and Michael Paquier
This commit is contained in:
Robert Haas
2014-02-19 08:35:23 -05:00
parent a222f7fda6
commit 7d03a83f4d
14 changed files with 391 additions and 3 deletions

View File

@ -483,6 +483,20 @@ typedef Datum *DatumPtr;
#define ObjectIdGetDatum(X) ((Datum) SET_4_BYTES(X))
/*
* DatumGetPgLsn
* Returns PostgreSQL log sequence number of a datum.
*/
#define DatumGetPgLsn(X) ((XLogRecPtr) GET_8_BYTES(X))
/*
* PG_LSNGetDatum
* Returns datum representation for a PostgreSQL log sequence number.
*/
#define PgLsnGetDatum(X) ((Datum) SET_8_BYTES(X))
/*
* DatumGetTransactionId
* Returns transaction identifier value of a datum.