Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
pg_lsn.h39 linesDownload Raw Back to utils
1/*-------------------------------------------------------------------------2 *3 * pg_lsn.h4 *		Declarations for operations on log sequence numbers (LSNs) of5 *		PostgreSQL.6 *7 *8 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group9 * Portions Copyright (c) 1994, Regents of the University of California10 *11 * src/include/utils/pg_lsn.h12 *13 *-------------------------------------------------------------------------14 */15#ifndef PG_LSN_H16#define PG_LSN_H17 18#include "access/xlogdefs.h"19#include "fmgr.h"20 21static inline XLogRecPtr22DatumGetLSN(Datum X)23{24	return (XLogRecPtr) DatumGetInt64(X);25}26 27static inline Datum28LSNGetDatum(XLogRecPtr X)29{30	return Int64GetDatum((int64) X);31}32 33#define PG_GETARG_LSN(n)	 DatumGetLSN(PG_GETARG_DATUM(n))34#define PG_RETURN_LSN(x)	 return LSNGetDatum(x)35 36extern XLogRecPtr pg_lsn_in_internal(const char *str, bool *have_error);37 38#endif							/* PG_LSN_H */39 
codekingpro/portable-devtools · Team Ai