PostgreSQL Source Code
git master
pg_lsn.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* pg_lsn.h
4
* Declarations for operations on log sequence numbers (LSNs) of
5
* PostgreSQL.
6
*
7
*
8
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
9
* Portions Copyright (c) 1994, Regents of the University of California
10
*
11
* src/include/utils/pg_lsn.h
12
*
13
*-------------------------------------------------------------------------
14
*/
15
#ifndef PG_LSN_H
16
#define PG_LSN_H
17
18
#include "
access/xlogdefs.h
"
19
#include "
fmgr.h
"
20
21
static
inline
XLogRecPtr
22
DatumGetLSN
(
Datum
X)
23
{
24
return
(
XLogRecPtr
)
DatumGetInt64
(X);
25
}
26
27
static
inline
Datum
28
LSNGetDatum
(
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
36
extern
XLogRecPtr
pg_lsn_in_internal
(
const
char
*
str
,
bool
*have_error);
37
38
#endif
/* PG_LSN_H */
Int64GetDatum
Datum Int64GetDatum(int64 X)
Definition:
fmgr.c:1807
fmgr.h
str
const char * str
Definition:
hashfn_unstable.h:263
pg_lsn_in_internal
XLogRecPtr pg_lsn_in_internal(const char *str, bool *have_error)
Definition:
pg_lsn.c:29
LSNGetDatum
static Datum LSNGetDatum(XLogRecPtr X)
Definition:
pg_lsn.h:28
DatumGetLSN
static XLogRecPtr DatumGetLSN(Datum X)
Definition:
pg_lsn.h:22
DatumGetInt64
static int64 DatumGetInt64(Datum X)
Definition:
postgres.h:385
Datum
uintptr_t Datum
Definition:
postgres.h:64
xlogdefs.h
XLogRecPtr
uint64 XLogRecPtr
Definition:
xlogdefs.h:21
src
include
utils
pg_lsn.h
Generated on Tue Nov 5 2024 00:13:26 for PostgreSQL Source Code by
1.9.1