Skip to content

Commit fcdbed0

Browse files
author
Alexander Korotkov
committed
Fix pg_xact_commit_timestamp argument get.
1 parent d960165 commit fcdbed0

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/backend/access/transam/commit_ts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ error_commit_ts_disabled(void)
396396
Datum
397397
pg_xact_commit_timestamp(PG_FUNCTION_ARGS)
398398
{
399-
TransactionId xid = PG_GETARG_UINT32(0);
399+
TransactionId xid = PG_GETARG_TRANSACTIONID(0);
400400
TimestampTz ts;
401401
bool found;
402402

src/backend/utils/adt/xid.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include "libpq/pqformat.h"
2323
#include "utils/builtins.h"
2424

25-
#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))
26-
#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)
27-
2825
#define PG_GETARG_COMMANDID(n) DatumGetCommandId(PG_GETARG_DATUM(n))
2926
#define PG_RETURN_COMMANDID(x) return CommandIdGetDatum(x)
3027

src/include/fmgr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum);
236236
#define PG_GETARG_FLOAT4(n) DatumGetFloat4(PG_GETARG_DATUM(n))
237237
#define PG_GETARG_FLOAT8(n) DatumGetFloat8(PG_GETARG_DATUM(n))
238238
#define PG_GETARG_INT64(n) DatumGetInt64(PG_GETARG_DATUM(n))
239+
#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))
239240
/* use this if you want the raw, possibly-toasted input datum: */
240241
#define PG_GETARG_RAW_VARLENA_P(n) ((struct varlena *) PG_GETARG_POINTER(n))
241242
/* use this if you want the input datum de-toasted: */
@@ -309,6 +310,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum);
309310
#define PG_RETURN_FLOAT4(x) return Float4GetDatum(x)
310311
#define PG_RETURN_FLOAT8(x) return Float8GetDatum(x)
311312
#define PG_RETURN_INT64(x) return Int64GetDatum(x)
313+
#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)
312314
/* RETURN macros for other pass-by-ref types will typically look like this: */
313315
#define PG_RETURN_BYTEA_P(x) PG_RETURN_POINTER(x)
314316
#define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy