aboutsummaryrefslogtreecommitdiff
path: root/src/include/postgres.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-02-19 08:35:23 -0500
committerRobert Haas <rhaas@postgresql.org>2014-02-19 08:35:23 -0500
commit7d03a83f4d0736ba869fa6f93973f7623a27038a (patch)
treed1d7f36c742fcea38edbbf7eb623cca2a52c1378 /src/include/postgres.h
parenta222f7fda6a04ab8ec655cd5a9de5ff70ff916c3 (diff)
downloadpostgresql-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.h14
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.
*/