aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-11-02 00:09:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-11-02 00:09:27 -0400
commit14ee35799f1640f44b3e154adcd7607f9a48307f (patch)
tree6a7cb6553baf4083b3777a8d61102b4b413521eb
parentf7c9a6e083da3f64e7440a31960b837353514262 (diff)
downloadpostgresql-14ee35799f1640f44b3e154adcd7607f9a48307f.tar.gz
postgresql-14ee35799f1640f44b3e154adcd7607f9a48307f.zip
Fix portability bug in gin_page_opaque_info().
Somebody apparently thought that "if Int32GetDatum is good, Int64GetDatum must be better". Per buildfarm failures now that Peter has added some regression tests here.
-rw-r--r--contrib/pageinspect/ginfuncs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c
index a2f119b02e5..145e2ce709c 100644
--- a/contrib/pageinspect/ginfuncs.c
+++ b/contrib/pageinspect/ginfuncs.c
@@ -100,7 +100,7 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
GinPageOpaque opaq;
HeapTuple resultTuple;
Datum values[3];
- bool nulls[10];
+ bool nulls[3];
Datum flags[16];
int nflags = 0;
uint16 flagbits;
@@ -152,9 +152,9 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
memset(nulls, 0, sizeof(nulls));
values[0] = Int64GetDatum(opaq->rightlink);
- values[1] = Int64GetDatum(opaq->maxoff);
- values[2] = PointerGetDatum(
- construct_array(flags, nflags, TEXTOID, -1, false, 'i'));
+ values[1] = Int32GetDatum(opaq->maxoff);
+ values[2] = PointerGetDatum(construct_array(flags, nflags,
+ TEXTOID, -1, false, 'i'));
/* Build and return the result tuple. */
resultTuple = heap_form_tuple(tupdesc, values, nulls);