summaryrefslogtreecommitdiff
path: root/contrib/test_decoding/test_decoding.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-30 12:24:15 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-30 12:35:50 +0200
commit57d46dff9b0ba8dc50fb37166373ea7638ecd2b9 (patch)
tree8a97758eea51b179496ffd5ee8283d88302a00e3 /contrib/test_decoding/test_decoding.c
parent4b7e6c73b0df3384345052616727a25505db5fcb (diff)
Make some use of anonymous unions [reorderbuffer xact_time]
Make some use of anonymous unions, which are allowed as of C11, as examples and encouragement for future code, and to test compilers. This commit changes the ReorderBufferTXN struct. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/f00a9968-388e-4f8c-b5ef-5102e962d997%40eisentraut.org
Diffstat (limited to 'contrib/test_decoding/test_decoding.c')
-rw-r--r--contrib/test_decoding/test_decoding.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/test_decoding/test_decoding.c b/contrib/test_decoding/test_decoding.c
index f671a7d4b31..36e77c69e1c 100644
--- a/contrib/test_decoding/test_decoding.c
+++ b/contrib/test_decoding/test_decoding.c
@@ -340,7 +340,7 @@ pg_decode_commit_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
if (data->include_timestamp)
appendStringInfo(ctx->out, " (at %s)",
- timestamptz_to_str(txn->xact_time.commit_time));
+ timestamptz_to_str(txn->commit_time));
OutputPluginWrite(ctx, true);
}
@@ -391,7 +391,7 @@ pg_decode_prepare_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
if (data->include_timestamp)
appendStringInfo(ctx->out, " (at %s)",
- timestamptz_to_str(txn->xact_time.prepare_time));
+ timestamptz_to_str(txn->prepare_time));
OutputPluginWrite(ctx, true);
}
@@ -413,7 +413,7 @@ pg_decode_commit_prepared_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn
if (data->include_timestamp)
appendStringInfo(ctx->out, " (at %s)",
- timestamptz_to_str(txn->xact_time.commit_time));
+ timestamptz_to_str(txn->commit_time));
OutputPluginWrite(ctx, true);
}
@@ -437,7 +437,7 @@ pg_decode_rollback_prepared_txn(LogicalDecodingContext *ctx,
if (data->include_timestamp)
appendStringInfo(ctx->out, " (at %s)",
- timestamptz_to_str(txn->xact_time.commit_time));
+ timestamptz_to_str(txn->commit_time));
OutputPluginWrite(ctx, true);
}
@@ -874,7 +874,7 @@ pg_decode_stream_prepare(LogicalDecodingContext *ctx,
if (data->include_timestamp)
appendStringInfo(ctx->out, " (at %s)",
- timestamptz_to_str(txn->xact_time.prepare_time));
+ timestamptz_to_str(txn->prepare_time));
OutputPluginWrite(ctx, true);
}
@@ -903,7 +903,7 @@ pg_decode_stream_commit(LogicalDecodingContext *ctx,
if (data->include_timestamp)
appendStringInfo(ctx->out, " (at %s)",
- timestamptz_to_str(txn->xact_time.commit_time));
+ timestamptz_to_str(txn->commit_time));
OutputPluginWrite(ctx, true);
}