mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Further code review for pg_lsn data type.
Change input function error messages to be more consistent with what is done elsewhere. Remove a bunch of redundant type casts, so that the compiler will warn us if we screw up. Don't pass LSNs by value on platforms where a Datum is only 32 bytes, per buildfarm. Move macros for packing and unpacking LSNs to pg_lsn.h so that we can include access/xlogdefs.h, to avoid an unsatisfied dependency on XLogRecPtr.
This commit is contained in:
@ -483,20 +483,6 @@ typedef Datum *DatumPtr;
|
||||
|
||||
#define ObjectIdGetDatum(X) ((Datum) SET_4_BYTES(X))
|
||||
|
||||
/*
|
||||
* DatumGetLSN
|
||||
* Returns PostgreSQL log sequence number of a datum.
|
||||
*/
|
||||
|
||||
#define DatumGetLSN(X) ((XLogRecPtr) GET_8_BYTES(X))
|
||||
|
||||
/*
|
||||
* LSNGetDatum
|
||||
* Returns datum representation for a PostgreSQL log sequence number.
|
||||
*/
|
||||
|
||||
#define LSNGetDatum(X) ((Datum) SET_8_BYTES(X))
|
||||
|
||||
/*
|
||||
* DatumGetTransactionId
|
||||
* Returns transaction identifier value of a datum.
|
||||
|
Reference in New Issue
Block a user