mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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.
This commit is contained in:
parent
e0491c19d5
commit
af636d7b53
@ -100,7 +100,7 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
|
|||||||
GinPageOpaque opaq;
|
GinPageOpaque opaq;
|
||||||
HeapTuple resultTuple;
|
HeapTuple resultTuple;
|
||||||
Datum values[3];
|
Datum values[3];
|
||||||
bool nulls[10];
|
bool nulls[3];
|
||||||
Datum flags[16];
|
Datum flags[16];
|
||||||
int nflags = 0;
|
int nflags = 0;
|
||||||
uint16 flagbits;
|
uint16 flagbits;
|
||||||
@ -152,9 +152,9 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
|
|||||||
memset(nulls, 0, sizeof(nulls));
|
memset(nulls, 0, sizeof(nulls));
|
||||||
|
|
||||||
values[0] = Int64GetDatum(opaq->rightlink);
|
values[0] = Int64GetDatum(opaq->rightlink);
|
||||||
values[1] = Int64GetDatum(opaq->maxoff);
|
values[1] = Int32GetDatum(opaq->maxoff);
|
||||||
values[2] = PointerGetDatum(
|
values[2] = PointerGetDatum(construct_array(flags, nflags,
|
||||||
construct_array(flags, nflags, TEXTOID, -1, false, 'i'));
|
TEXTOID, -1, false, 'i'));
|
||||||
|
|
||||||
/* Build and return the result tuple. */
|
/* Build and return the result tuple. */
|
||||||
resultTuple = heap_form_tuple(tupdesc, values, nulls);
|
resultTuple = heap_form_tuple(tupdesc, values, nulls);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user