Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2a8783e

Browse files
committed
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.
1 parent b0034e7 commit 2a8783e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/pageinspect/ginfuncs.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
100100
GinPageOpaque opaq;
101101
HeapTuple resultTuple;
102102
Datum values[3];
103-
bool nulls[10];
103+
bool nulls[3];
104104
Datum flags[16];
105105
int nflags = 0;
106106
uint16 flagbits;
@@ -152,9 +152,9 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
152152
memset(nulls, 0, sizeof(nulls));
153153

154154
values[0] = Int64GetDatum(opaq->rightlink);
155-
values[1] = Int64GetDatum(opaq->maxoff);
156-
values[2] = PointerGetDatum(
157-
construct_array(flags, nflags, TEXTOID, -1, false, 'i'));
155+
values[1] = Int32GetDatum(opaq->maxoff);
156+
values[2] = PointerGetDatum(construct_array(flags, nflags,
157+
TEXTOID, -1, false, 'i'));
158158

159159
/* Build and return the result tuple. */
160160
resultTuple = heap_form_tuple(tupdesc, values, nulls);

0 commit comments

Comments
 (0)