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

PGPRO-8238, PGPRO-8122: Fix build with master at 5df319f3d. Corrected number of args in some functions. #269

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
Jun 21, 2023
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
26 changes: 20 additions & 6 deletions src/include/compat/pg_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,12 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
/*
* ExecBRUpdateTriggers()
*/
#if PG_VERSION_NUM >= 150000 /* for commit 7103ebb7aae8 */
#if PG_VERSION_NUM >= 160000
#define ExecBRUpdateTriggersCompat(estate, epqstate, relinfo, \
tupleid, fdw_trigtuple, newslot) \
ExecBRUpdateTriggers((estate), (epqstate), (relinfo), (tupleid), \
(fdw_trigtuple), (newslot), NULL, NULL)
#elif PG_VERSION_NUM >= 150000 /* for commit 7103ebb7aae8 */
#define ExecBRUpdateTriggersCompat(estate, epqstate, relinfo, \
tupleid, fdw_trigtuple, newslot) \
ExecBRUpdateTriggers((estate), (epqstate), (relinfo), (tupleid), \
Expand Down Expand Up @@ -809,7 +814,12 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
/*
* ExecBRDeleteTriggers()
*/
#if PG_VERSION_NUM >= 110000
#if PG_VERSION_NUM >= 160000
#define ExecBRDeleteTriggersCompat(estate, epqstate, relinfo, tupleid, \
fdw_trigtuple, epqslot) \
ExecBRDeleteTriggers((estate), (epqstate), (relinfo), (tupleid), \
(fdw_trigtuple), (epqslot), NULL, NULL)
#elif PG_VERSION_NUM >= 110000
#define ExecBRDeleteTriggersCompat(estate, epqstate, relinfo, tupleid, \
fdw_trigtuple, epqslot) \
ExecBRDeleteTriggers((estate), (epqstate), (relinfo), (tupleid), \
Expand Down Expand Up @@ -1028,15 +1038,19 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
/*
* ExecInsertIndexTuples. Since 12 slot contains tupleid.
* Since 14: new fields "resultRelInfo", "update".
* Since 16: new bool field "onlySummarizing".
*/
#if PG_VERSION_NUM >= 140000
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes) \
#if PG_VERSION_NUM >= 160000
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes, onlySummarizing) \
ExecInsertIndexTuples((resultRelInfo), (slot), (estate), (update), (noDupError), (specConflict), (arbiterIndexes), (onlySummarizing))
#elif PG_VERSION_NUM >= 140000
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes, onlySummarizing) \
ExecInsertIndexTuples((resultRelInfo), (slot), (estate), (update), (noDupError), (specConflict), (arbiterIndexes))
#elif PG_VERSION_NUM >= 120000
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes) \
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes, onlySummarizing) \
ExecInsertIndexTuples((slot), (estate), (noDupError), (specConflict), (arbiterIndexes))
#else
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes) \
#define ExecInsertIndexTuplesCompat(resultRelInfo, slot, tupleid, estate, update, noDupError, specConflict, arbiterIndexes, onlySummarizing) \
ExecInsertIndexTuples((slot), (tupleid), (estate), (noDupError), (specConflict), (arbiterIndexes))
#endif

Expand Down
8 changes: 6 additions & 2 deletions src/utility_stmt_hooking.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,14 @@ PathmanCopyFrom(

#if PG_VERSION_NUM >= 140000 /* reworked in 1375422c7826 */
/*
* Call ExecInitRangeTable() should be first because in 14 it initializes
* Call ExecInitRangeTable() should be first because in 14+ it initializes
* field "estate->es_result_relations":
*/
#if PG_VERSION_NUM >= 160000
ExecInitRangeTable(estate, range_table, cstate->rteperminfos);
#else
ExecInitRangeTable(estate, range_table);
#endif
estate->es_result_relations =
(ResultRelInfo **) palloc0(list_length(range_table) * sizeof(ResultRelInfo *));
estate->es_result_relations[0] = parent_rri;
Expand Down Expand Up @@ -749,7 +753,7 @@ PathmanCopyFrom(
/* ... and create index entries for it */
if (child_rri->ri_NumIndices > 0)
recheckIndexes = ExecInsertIndexTuplesCompat(estate->es_result_relation_info,
slot, &(tuple->t_self), estate, false, false, NULL, NIL);
slot, &(tuple->t_self), estate, false, false, NULL, NIL, false);
}
#ifdef PG_SHARDMAN
/* Handle foreign tables */
Expand Down