1 /*-------------------------------------------------------------------------
4 * Declarations for operations on log sequence numbers (LSNs) of
8 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/include/utils/pg_lsn.h
13 *-------------------------------------------------------------------------
19 #include "access/xlogdefs.h"
21 #define DatumGetLSN(X) ((XLogRecPtr) DatumGetInt64(X))
22 #define LSNGetDatum(X) (Int64GetDatum((int64) (X)))
24 #define PG_GETARG_LSN(n) DatumGetLSN(PG_GETARG_DATUM(n))
25 #define PG_RETURN_LSN(x) return LSNGetDatum(x)
27 extern XLogRecPtr pg_lsn_in_internal(const char *str, bool *have_error);