Skip to content

Commit f7e49c6

Browse files
author
Marina Polyakova
committed
Fix build due to new checks in PostgreSQL 16
Use UInt64GetDatum instead of Int64GetDatumFast for uint64 variables as the input data type is now checked (see the commit c8b2ef05f481ef06326d7b9f3eb14b303f215c7e in PostgreSQL 16).
1 parent 067ba2f commit f7e49c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: pg_wait_sampling.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ pg_wait_sampling_get_current(PG_FUNCTION_ARGS)
546546
else
547547
nulls[2] = true;
548548

549-
values[3] = Int64GetDatumFast(item->queryId);
549+
values[3] = UInt64GetDatum(item->queryId);
550550
tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls);
551551

552552
SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
@@ -732,11 +732,11 @@ pg_wait_sampling_get_profile(PG_FUNCTION_ARGS)
732732
nulls[2] = true;
733733

734734
if (pgws_collector_hdr->profileQueries)
735-
values[3] = Int64GetDatumFast(item->queryId);
735+
values[3] = UInt64GetDatum(item->queryId);
736736
else
737737
values[3] = (Datum) 0;
738738

739-
values[4] = Int64GetDatumFast(item->count);
739+
values[4] = UInt64GetDatum(item->count);
740740

741741
tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls);
742742

@@ -848,7 +848,7 @@ pg_wait_sampling_get_history(PG_FUNCTION_ARGS)
848848
else
849849
nulls[3] = true;
850850

851-
values[4] = Int64GetDatumFast(item->queryId);
851+
values[4] = UInt64GetDatum(item->queryId);
852852
tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls);
853853

854854
history->index++;

0 commit comments

Comments
 (0)