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

Fix build due to new checks in PostgreSQL 16 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,7 @@ Datum vops_text_output(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(vops_text_typmod_in);
Datum vops_text_typmod_in(PG_FUNCTION_ARGS)
{
ArrayType* arr = (ArrayType*)DatumGetPointer(PG_DETOAST_DATUM(PG_GETARG_DATUM(0)));
ArrayType* arr = (ArrayType*) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
int n;
int32* typemods = ArrayGetIntegerTypmods(arr, &n);
int len;
Expand Down Expand Up @@ -4418,7 +4418,7 @@ vops_substitute_tables_with_projections(char const* queryString, Query *query)
datum = SPI_getbinval(tuple, tupDesc, 3, &isnull);
if (!isnull)
{
vectorColumns = (ArrayType*)DatumGetPointer(PG_DETOAST_DATUM(datum));
vectorColumns = (ArrayType*) PG_DETOAST_DATUM(datum);

/* Construct set of used vector columns */
deconstruct_array(vectorColumns, INT4OID, 4, true, 'i', &vectorAttnos, NULL, &nVectorColumns);
Expand All @@ -4431,7 +4431,7 @@ vops_substitute_tables_with_projections(char const* queryString, Query *query)
datum = SPI_getbinval(tuple, tupDesc, 4, &isnull);
if (!isnull)
{
scalarColumns = isnull ? NULL : (ArrayType*)DatumGetPointer(PG_DETOAST_DATUM(datum));
scalarColumns = isnull ? NULL : (ArrayType*) PG_DETOAST_DATUM(datum);

/* Construct set of used scalar columns */
deconstruct_array(scalarColumns, INT4OID, 4, true, 'i', &scalarAttnos, NULL, &nScalarColumns);
Expand Down
4 changes: 2 additions & 2 deletions vops.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#define VOPS_SIZEOF_TEXT(width) (LONGALIGN(VARHDRSZ) + sizeof(vops_tile_hdr) + (width)*TILE_SIZE)
#define VOPS_ELEM_SIZE(var) ((VARSIZE(var) - LONGALIGN(VARHDRSZ) - sizeof(vops_tile_hdr)) / TILE_SIZE)
#define VOPS_TEXT_TILE(val) ((vops_tile_hdr*)((char*)DatumGetTextP(val) + LONGALIGN(VARHDRSZ)))
#define VOPS_GET_TILE(val,tid) (((tid) == VOPS_TEXT) ? VOPS_TEXT_TILE(val) : (vops_tile_hdr*)DatumGetPointer(val))
#define VOPS_TEXT_TILE(val) ((vops_tile_hdr*)((char*) pg_detoast_datum(val) + LONGALIGN(VARHDRSZ)))
#define VOPS_GET_TILE(val,tid) (((tid) == VOPS_TEXT) ? VOPS_TEXT_TILE((struct varlena *) DatumGetPointer(val)) : (vops_tile_hdr*)DatumGetPointer(val))

typedef enum
{
Expand Down