diff options
author | Robert Haas <rhaas@postgresql.org> | 2014-02-19 08:35:23 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2014-02-19 08:35:23 -0500 |
commit | 7d03a83f4d0736ba869fa6f93973f7623a27038a (patch) | |
tree | d1d7f36c742fcea38edbbf7eb623cca2a52c1378 /src/include/postgres.h | |
parent | a222f7fda6a04ab8ec655cd5a9de5ff70ff916c3 (diff) | |
download | postgresql-7d03a83f4d0736ba869fa6f93973f7623a27038a.tar.gz postgresql-7d03a83f4d0736ba869fa6f93973f7623a27038a.zip |
Add a pg_lsn data type, to represent an LSN.
Robert Haas and Michael Paquier
Diffstat (limited to 'src/include/postgres.h')
-rw-r--r-- | src/include/postgres.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/postgres.h b/src/include/postgres.h index a8a206d988b..e72d5fca2b1 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -484,6 +484,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. */ |