Merge pull request #6091 from citusdata/minor_fixes

Remove useless PG version compats
pull/6105/head
Önder Kalacı 2022-07-29 10:46:17 +02:00 committed by GitHub
commit 51a43dce4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 103 additions and 132 deletions

3
.gitattributes vendored
View File

@ -26,9 +26,6 @@ configure -whitespace
# except these exceptions... # except these exceptions...
src/backend/distributed/utils/citus_outfuncs.c -citus-style src/backend/distributed/utils/citus_outfuncs.c -citus-style
src/backend/distributed/utils/pg11_snprintf.c -citus-style
src/backend/distributed/deparser/ruleutils_11.c -citus-style
src/backend/distributed/deparser/ruleutils_12.c -citus-style
src/backend/distributed/deparser/ruleutils_13.c -citus-style src/backend/distributed/deparser/ruleutils_13.c -citus-style
src/backend/distributed/deparser/ruleutils_14.c -citus-style src/backend/distributed/deparser/ruleutils_14.c -citus-style
src/backend/distributed/commands/index_pg_source.c -citus-style src/backend/distributed/commands/index_pg_source.c -citus-style

View File

@ -122,7 +122,7 @@ static void ColumnarProcessUtility(PlannedStmt *pstmt,
ParamListInfo params, ParamListInfo params,
struct QueryEnvironment *queryEnv, struct QueryEnvironment *queryEnv,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag); QueryCompletion *completionTag);
static bool ConditionalLockRelationWithTimeout(Relation rel, LOCKMODE lockMode, static bool ConditionalLockRelationWithTimeout(Relation rel, LOCKMODE lockMode,
int timeout, int retryInterval); int timeout, int retryInterval);
static List * NeededColumnsList(TupleDesc tupdesc, Bitmapset *attr_needed); static List * NeededColumnsList(TupleDesc tupdesc, Bitmapset *attr_needed);
@ -2239,7 +2239,7 @@ ColumnarProcessUtility(PlannedStmt *pstmt,
ParamListInfo params, ParamListInfo params,
struct QueryEnvironment *queryEnv, struct QueryEnvironment *queryEnv,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag) QueryCompletion *completionTag)
{ {
#if PG_VERSION_NUM >= PG_VERSION_14 #if PG_VERSION_NUM >= PG_VERSION_14
if (readOnlyTree) if (readOnlyTree)
@ -2956,7 +2956,7 @@ AvailableExtensionVersionColumnar(void)
/* pg_available_extensions returns result set containing all available extensions */ /* pg_available_extensions returns result set containing all available extensions */
(*pg_available_extensions)(fcinfo); (*pg_available_extensions)(fcinfo);
TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlotCompat( TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlot(
extensionsResultSet->setDesc, extensionsResultSet->setDesc,
&TTSOpsMinimalTuple); &TTSOpsMinimalTuple);
bool hasTuple = tuplestore_gettupleslot(extensionsResultSet->setResult, goForward, bool hasTuple = tuplestore_gettupleslot(extensionsResultSet->setResult, goForward,

View File

@ -168,8 +168,8 @@ CallDistributedProcedureRemotely(CallStmt *callStmt, DestReceiver *dest)
{ {
Tuplestorestate *tupleStore = tuplestore_begin_heap(true, false, work_mem); Tuplestorestate *tupleStore = tuplestore_begin_heap(true, false, work_mem);
TupleDesc tupleDesc = CallStmtResultDesc(callStmt); TupleDesc tupleDesc = CallStmtResultDesc(callStmt);
TupleTableSlot *slot = MakeSingleTupleTableSlotCompat(tupleDesc, TupleTableSlot *slot = MakeSingleTupleTableSlot(tupleDesc,
&TTSOpsMinimalTuple); &TTSOpsMinimalTuple);
bool expectResults = true; bool expectResults = true;
Task *task = CitusMakeNode(Task); Task *task = CitusMakeNode(Task);

View File

@ -1654,7 +1654,7 @@ CopyLocalDataIntoShards(Oid distributedRelationId)
/* get the table columns */ /* get the table columns */
TupleDesc tupleDescriptor = RelationGetDescr(distributedRelation); TupleDesc tupleDescriptor = RelationGetDescr(distributedRelation);
TupleTableSlot *slot = CreateTableSlotForRel(distributedRelation); TupleTableSlot *slot = table_slot_create(distributedRelation, NULL);
List *columnNameList = TupleDescColumnNameList(tupleDescriptor); List *columnNameList = TupleDescColumnNameList(tupleDescriptor);
int partitionColumnIndex = INVALID_PARTITION_COLUMN_INDEX; int partitionColumnIndex = INVALID_PARTITION_COLUMN_INDEX;

View File

@ -245,7 +245,7 @@ typedef enum LocalCopyStatus
/* Local functions forward declarations */ /* Local functions forward declarations */
static void CopyToExistingShards(CopyStmt *copyStatement, static void CopyToExistingShards(CopyStmt *copyStatement,
QueryCompletionCompat *completionTag); QueryCompletion *completionTag);
static bool IsCopyInBinaryFormat(CopyStmt *copyStatement); static bool IsCopyInBinaryFormat(CopyStmt *copyStatement);
static List * FindJsonbInputColumns(TupleDesc tupleDescriptor, static List * FindJsonbInputColumns(TupleDesc tupleDescriptor,
List *inputColumnNameList); List *inputColumnNameList);
@ -274,7 +274,7 @@ static FmgrInfo * TypeOutputFunctions(uint32 columnCount, Oid *typeIdArray,
static List * CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist); static List * CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist);
#endif #endif
static bool CopyStatementHasFormat(CopyStmt *copyStatement, char *formatName); static bool CopyStatementHasFormat(CopyStmt *copyStatement, char *formatName);
static void CitusCopyFrom(CopyStmt *copyStatement, QueryCompletionCompat *completionTag); static void CitusCopyFrom(CopyStmt *copyStatement, QueryCompletion *completionTag);
static void EnsureCopyCanRunOnRelation(Oid relationId); static void EnsureCopyCanRunOnRelation(Oid relationId);
static HTAB * CreateConnectionStateHash(MemoryContext memoryContext); static HTAB * CreateConnectionStateHash(MemoryContext memoryContext);
static HTAB * CreateShardStateHash(MemoryContext memoryContext); static HTAB * CreateShardStateHash(MemoryContext memoryContext);
@ -308,7 +308,7 @@ static void UnclaimCopyConnections(List *connectionStateList);
static void ShutdownCopyConnectionState(CopyConnectionState *connectionState, static void ShutdownCopyConnectionState(CopyConnectionState *connectionState,
CitusCopyDestReceiver *copyDest); CitusCopyDestReceiver *copyDest);
static SelectStmt * CitusCopySelect(CopyStmt *copyStatement); static SelectStmt * CitusCopySelect(CopyStmt *copyStatement);
static void CitusCopyTo(CopyStmt *copyStatement, QueryCompletionCompat *completionTag); static void CitusCopyTo(CopyStmt *copyStatement, QueryCompletion *completionTag);
static int64 ForwardCopyDataFromConnection(CopyOutState copyOutState, static int64 ForwardCopyDataFromConnection(CopyOutState copyOutState,
MultiConnection *connection); MultiConnection *connection);
@ -345,7 +345,7 @@ static bool CitusCopyDestReceiverReceive(TupleTableSlot *slot,
static void CitusCopyDestReceiverShutdown(DestReceiver *destReceiver); static void CitusCopyDestReceiverShutdown(DestReceiver *destReceiver);
static void CitusCopyDestReceiverDestroy(DestReceiver *destReceiver); static void CitusCopyDestReceiverDestroy(DestReceiver *destReceiver);
static bool ContainsLocalPlacement(int64 shardId); static bool ContainsLocalPlacement(int64 shardId);
static void CompleteCopyQueryTagCompat(QueryCompletionCompat *completionTag, uint64 static void CompleteCopyQueryTagCompat(QueryCompletion *completionTag, uint64
processedRowCount); processedRowCount);
static void FinishLocalCopy(CitusCopyDestReceiver *copyDest); static void FinishLocalCopy(CitusCopyDestReceiver *copyDest);
static void CreateLocalColocatedIntermediateFile(CitusCopyDestReceiver *copyDest, static void CreateLocalColocatedIntermediateFile(CitusCopyDestReceiver *copyDest,
@ -368,7 +368,7 @@ PG_FUNCTION_INFO_V1(citus_text_send_as_jsonb);
* and the partition method of the distributed table. * and the partition method of the distributed table.
*/ */
static void static void
CitusCopyFrom(CopyStmt *copyStatement, QueryCompletionCompat *completionTag) CitusCopyFrom(CopyStmt *copyStatement, QueryCompletion *completionTag)
{ {
UseCoordinatedTransaction(); UseCoordinatedTransaction();
@ -450,7 +450,7 @@ EnsureCopyCanRunOnRelation(Oid relationId)
* rows. * rows.
*/ */
static void static void
CopyToExistingShards(CopyStmt *copyStatement, QueryCompletionCompat *completionTag) CopyToExistingShards(CopyStmt *copyStatement, QueryCompletion *completionTag)
{ {
Oid tableId = RangeVarGetRelid(copyStatement->relation, NoLock, false); Oid tableId = RangeVarGetRelid(copyStatement->relation, NoLock, false);
@ -471,8 +471,8 @@ CopyToExistingShards(CopyStmt *copyStatement, QueryCompletionCompat *completionT
bool *columnNulls = palloc0(columnCount * sizeof(bool)); bool *columnNulls = palloc0(columnCount * sizeof(bool));
/* set up a virtual tuple table slot */ /* set up a virtual tuple table slot */
TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlotCompat(tupleDescriptor, TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlot(tupleDescriptor,
&TTSOpsVirtual); &TTSOpsVirtual);
tupleTableSlot->tts_nvalid = columnCount; tupleTableSlot->tts_nvalid = columnCount;
tupleTableSlot->tts_values = columnValues; tupleTableSlot->tts_values = columnValues;
tupleTableSlot->tts_isnull = columnNulls; tupleTableSlot->tts_isnull = columnNulls;
@ -639,8 +639,8 @@ CopyToExistingShards(CopyStmt *copyStatement, QueryCompletionCompat *completionT
MemoryContext oldContext = MemoryContextSwitchTo(executorTupleContext); MemoryContext oldContext = MemoryContextSwitchTo(executorTupleContext);
/* parse a row from the input */ /* parse a row from the input */
bool nextRowFound = NextCopyFromCompat(copyState, executorExpressionContext, bool nextRowFound = NextCopyFrom(copyState, executorExpressionContext,
columnValues, columnNulls); columnValues, columnNulls);
if (!nextRowFound) if (!nextRowFound)
{ {
@ -760,7 +760,7 @@ FindJsonbInputColumns(TupleDesc tupleDescriptor, List *inputColumnNameList)
static void static void
CompleteCopyQueryTagCompat(QueryCompletionCompat *completionTag, uint64 processedRowCount) CompleteCopyQueryTagCompat(QueryCompletion *completionTag, uint64 processedRowCount)
{ {
SetQueryCompletion(completionTag, CMDTAG_COPY, processedRowCount); SetQueryCompletion(completionTag, CMDTAG_COPY, processedRowCount);
} }
@ -780,7 +780,7 @@ RemoveOptionFromList(List *optionList, char *optionName)
if (strncmp(option->defname, optionName, NAMEDATALEN) == 0) if (strncmp(option->defname, optionName, NAMEDATALEN) == 0)
{ {
return list_delete_cell_compat(optionList, optionCell, previousCell); return list_delete_cell(optionList, optionCell);
} }
} }
@ -1387,7 +1387,7 @@ ColumnCoercionPaths(TupleDesc destTupleDescriptor, TupleDesc inputTupleDescripto
ConversionPathForTypes(inputTupleType, destTupleType, ConversionPathForTypes(inputTupleType, destTupleType,
&coercePaths[columnIndex]); &coercePaths[columnIndex]);
currentColumnName = lnext_compat(columnNameList, currentColumnName); currentColumnName = lnext(columnNameList, currentColumnName);
if (currentColumnName == NULL) if (currentColumnName == NULL)
{ {
@ -2864,7 +2864,7 @@ CopyStatementHasFormat(CopyStmt *copyStatement, char *formatName)
* further processing is needed. * further processing is needed.
*/ */
Node * Node *
ProcessCopyStmt(CopyStmt *copyStatement, QueryCompletionCompat *completionTag, const ProcessCopyStmt(CopyStmt *copyStatement, QueryCompletion *completionTag, const
char *queryString) char *queryString)
{ {
/* /*
@ -3016,7 +3016,7 @@ CitusCopySelect(CopyStmt *copyStatement)
* table dump. * table dump.
*/ */
static void static void
CitusCopyTo(CopyStmt *copyStatement, QueryCompletionCompat *completionTag) CitusCopyTo(CopyStmt *copyStatement, QueryCompletion *completionTag)
{ {
ListCell *shardIntervalCell = NULL; ListCell *shardIntervalCell = NULL;
int64 tuplesSent = 0; int64 tuplesSent = 0;
@ -3481,7 +3481,7 @@ InitializeCopyShardState(CopyShardState *shardState,
bool hasRemoteCopy = false; bool hasRemoteCopy = false;
MemoryContext localContext = MemoryContext localContext =
AllocSetContextCreateExtended(CurrentMemoryContext, AllocSetContextCreateInternal(CurrentMemoryContext,
"InitializeCopyShardState", "InitializeCopyShardState",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_INITSIZE,

View File

@ -362,7 +362,7 @@ PreprocessAlterPolicyStmt(Node *node, const char *queryString,
appendStringInfoString(&ddlString, RoleSpecString(roleSpec, true)); appendStringInfoString(&ddlString, RoleSpecString(roleSpec, true));
if (lnext_compat(stmt->roles, roleCell) != NULL) if (lnext(stmt->roles, roleCell) != NULL)
{ {
appendStringInfoString(&ddlString, ", "); appendStringInfoString(&ddlString, ", ");
} }

View File

@ -191,7 +191,7 @@ ExtractDefaultColumnsAndOwnedSequences(Oid relationId, List **columnNameList,
*columnNameList = lappend(*columnNameList, columnName); *columnNameList = lappend(*columnNameList, columnName);
List *columnOwnedSequences = List *columnOwnedSequences =
GetSequencesOwnedByColumn(relationId, attributeIndex + 1); getOwnedSequences_internal(relationId, attributeIndex + 1, 0);
Oid ownedSequenceId = InvalidOid; Oid ownedSequenceId = InvalidOid;
if (list_length(columnOwnedSequences) != 0) if (list_length(columnOwnedSequences) != 0)

View File

@ -45,9 +45,8 @@ ProcessCreateSubscriptionStmt(CreateSubscriptionStmt *createSubStmt)
{ {
useAuthinfo = defGetBoolean(defElem); useAuthinfo = defGetBoolean(defElem);
createSubStmt->options = list_delete_cell_compat(createSubStmt->options, createSubStmt->options = list_delete_cell(createSubStmt->options,
currCell, currCell);
prevCell);
break; break;
} }

View File

@ -104,7 +104,7 @@ static void ProcessUtilityInternal(PlannedStmt *pstmt,
ParamListInfo params, ParamListInfo params,
struct QueryEnvironment *queryEnv, struct QueryEnvironment *queryEnv,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag); QueryCompletion *completionTag);
#if PG_VERSION_NUM >= 140000 #if PG_VERSION_NUM >= 140000
static void set_indexsafe_procflags(void); static void set_indexsafe_procflags(void);
#endif #endif
@ -128,7 +128,7 @@ void
ProcessUtilityParseTree(Node *node, const char *queryString, ProcessUtilityContext ProcessUtilityParseTree(Node *node, const char *queryString, ProcessUtilityContext
context, context,
ParamListInfo params, DestReceiver *dest, ParamListInfo params, DestReceiver *dest,
QueryCompletionCompat *completionTag) QueryCompletion *completionTag)
{ {
PlannedStmt *plannedStmt = makeNode(PlannedStmt); PlannedStmt *plannedStmt = makeNode(PlannedStmt);
plannedStmt->commandType = CMD_UTILITY; plannedStmt->commandType = CMD_UTILITY;
@ -158,7 +158,7 @@ multi_ProcessUtility(PlannedStmt *pstmt,
ParamListInfo params, ParamListInfo params,
struct QueryEnvironment *queryEnv, struct QueryEnvironment *queryEnv,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag) QueryCompletion *completionTag)
{ {
Node *parsetree; Node *parsetree;
@ -372,7 +372,7 @@ ProcessUtilityInternal(PlannedStmt *pstmt,
ParamListInfo params, ParamListInfo params,
struct QueryEnvironment *queryEnv, struct QueryEnvironment *queryEnv,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag) QueryCompletion *completionTag)
{ {
Node *parsetree = pstmt->utilityStmt; Node *parsetree = pstmt->utilityStmt;
List *ddlJobs = NIL; List *ddlJobs = NIL;

View File

@ -105,7 +105,7 @@ InitializeConnectionManagement(void)
* management. Doing so, instead of allocating in TopMemoryContext, makes * management. Doing so, instead of allocating in TopMemoryContext, makes
* it easier to associate used memory. * it easier to associate used memory.
*/ */
ConnectionContext = AllocSetContextCreateExtended(TopMemoryContext, ConnectionContext = AllocSetContextCreateInternal(TopMemoryContext,
"Connection Context", "Connection Context",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_INITSIZE,

View File

@ -339,7 +339,7 @@ ExecuteLocalTaskListExtended(List *taskList,
* implemented. So, let planner to call distributed_planner() which * implemented. So, let planner to call distributed_planner() which
* eventually calls standard_planner(). * eventually calls standard_planner().
*/ */
localPlan = planner_compat(shardQuery, cursorOptions, paramListInfo); localPlan = planner(shardQuery, NULL, cursorOptions, paramListInfo);
} }
char *shardQueryString = NULL; char *shardQueryString = NULL;
@ -382,8 +382,8 @@ LocallyPlanAndExecuteMultipleQueries(List *queryStrings, TupleDestination *tuple
0); 0);
int cursorOptions = 0; int cursorOptions = 0;
ParamListInfo paramListInfo = NULL; ParamListInfo paramListInfo = NULL;
PlannedStmt *localPlan = planner_compat(shardQuery, cursorOptions, PlannedStmt *localPlan = planner(shardQuery, NULL, cursorOptions,
paramListInfo); paramListInfo);
totalProcessedRows += LocallyExecuteTaskPlan(localPlan, queryString, totalProcessedRows += LocallyExecuteTaskPlan(localPlan, queryString,
tupleDest, task, tupleDest, task,
paramListInfo); paramListInfo);

View File

@ -459,8 +459,8 @@ ReadFileIntoTupleStore(char *fileName, char *copyFormat, TupleDesc tupleDescript
ResetPerTupleExprContext(executorState); ResetPerTupleExprContext(executorState);
MemoryContext oldContext = MemoryContextSwitchTo(executorTupleContext); MemoryContext oldContext = MemoryContextSwitchTo(executorTupleContext);
bool nextRowFound = NextCopyFromCompat(copyState, executorExpressionContext, bool nextRowFound = NextCopyFrom(copyState, executorExpressionContext,
columnValues, columnNulls); columnValues, columnNulls);
if (!nextRowFound) if (!nextRowFound)
{ {
MemoryContextSwitchTo(oldContext); MemoryContextSwitchTo(oldContext);
@ -554,8 +554,8 @@ SortTupleStore(CitusScanState *scanState)
/* iterate over all the sorted tuples, add them to original tuplestore */ /* iterate over all the sorted tuples, add them to original tuplestore */
while (true) while (true)
{ {
TupleTableSlot *newSlot = MakeSingleTupleTableSlotCompat(tupleDescriptor, TupleTableSlot *newSlot = MakeSingleTupleTableSlot(tupleDescriptor,
&TTSOpsMinimalTuple); &TTSOpsMinimalTuple);
bool found = tuplesort_gettupleslot(tuplesortstate, true, false, newSlot, NULL); bool found = tuplesort_gettupleslot(tuplesortstate, true, false, newSlot, NULL);
if (!found) if (!found)
@ -660,7 +660,7 @@ ExecuteQueryIntoDestReceiver(Query *query, ParamListInfo params, DestReceiver *d
} }
/* plan the subquery, this may be another distributed query */ /* plan the subquery, this may be another distributed query */
PlannedStmt *queryPlan = pg_plan_query_compat(query, NULL, cursorOptions, params); PlannedStmt *queryPlan = pg_plan_query(query, NULL, cursorOptions, params);
ExecutePlanIntoDestReceiver(queryPlan, params, dest); ExecutePlanIntoDestReceiver(queryPlan, params, dest);
} }
@ -686,7 +686,7 @@ ExecutePlanIntoDestReceiver(PlannedStmt *queryPlan, ParamListInfo params,
PortalDefineQuery(portal, PortalDefineQuery(portal,
NULL, NULL,
"", "",
CMDTAG_SELECT_COMPAT, CMDTAG_SELECT,
list_make1(queryPlan), list_make1(queryPlan),
NULL); NULL);

View File

@ -286,14 +286,14 @@ StartPortalForQueryExecution(const char *queryString)
Query *query = ParseQueryString(queryString, NULL, 0); Query *query = ParseQueryString(queryString, NULL, 0);
int cursorOptions = CURSOR_OPT_PARALLEL_OK; int cursorOptions = CURSOR_OPT_PARALLEL_OK;
PlannedStmt *queryPlan = pg_plan_query_compat(query, NULL, cursorOptions, NULL); PlannedStmt *queryPlan = pg_plan_query(query, NULL, cursorOptions, NULL);
Portal portal = CreateNewPortal(); Portal portal = CreateNewPortal();
/* don't display the portal in pg_cursors, it is for internal use only */ /* don't display the portal in pg_cursors, it is for internal use only */
portal->visible = false; portal->visible = false;
PortalDefineQuery(portal, NULL, queryString, CMDTAG_SELECT_COMPAT, PortalDefineQuery(portal, NULL, queryString, CMDTAG_SELECT,
list_make1(queryPlan), NULL); list_make1(queryPlan), NULL);
int eflags = 0; int eflags = 0;
PortalStart(portal, NULL, eflags, GetActiveSnapshot()); PortalStart(portal, NULL, eflags, GetActiveSnapshot());

View File

@ -868,7 +868,7 @@ BuildExistingQueryIdHash(void)
fmgrPGStatStatements->fn_addr, fmgrPGStatStatements->fn_addr,
pgStatStatementsOid, pgStatStatementsOid,
commandTypeDatum); commandTypeDatum);
TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlotCompat( TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlot(
statStatementsReturnSet->setDesc, statStatementsReturnSet->setDesc,
&TTSOpsMinimalTuple); &TTSOpsMinimalTuple);

View File

@ -2209,7 +2209,7 @@ AvailableExtensionVersion(void)
/* pg_available_extensions returns result set containing all available extensions */ /* pg_available_extensions returns result set containing all available extensions */
(*pg_available_extensions)(fcinfo); (*pg_available_extensions)(fcinfo);
TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlotCompat( TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlot(
extensionsResultSet->setDesc, extensionsResultSet->setDesc,
&TTSOpsMinimalTuple); &TTSOpsMinimalTuple);
bool hasTuple = tuplestore_gettupleslot(extensionsResultSet->setResult, goForward, bool hasTuple = tuplestore_gettupleslot(extensionsResultSet->setResult, goForward,
@ -2700,10 +2700,10 @@ CitusCopyFormatTypeId(void)
if (MetadataCache.copyFormatTypeId == InvalidOid) if (MetadataCache.copyFormatTypeId == InvalidOid)
{ {
char *typeName = "citus_copy_format"; char *typeName = "citus_copy_format";
MetadataCache.copyFormatTypeId = GetSysCacheOid2Compat(TYPENAMENSP, MetadataCache.copyFormatTypeId = GetSysCacheOid2(TYPENAMENSP,
Anum_pg_enum_oid, Anum_pg_enum_oid,
PointerGetDatum(typeName), PointerGetDatum(typeName),
PG_CATALOG_NAMESPACE); PG_CATALOG_NAMESPACE);
} }
return MetadataCache.copyFormatTypeId; return MetadataCache.copyFormatTypeId;

View File

@ -170,7 +170,7 @@ master_get_table_ddl_events(PG_FUNCTION_ARGS)
Assert(CitusIsA(ddlStatement, TableDDLCommand)); Assert(CitusIsA(ddlStatement, TableDDLCommand));
text *ddlStatementText = cstring_to_text(GetTableDDLCommand(ddlStatement)); text *ddlStatementText = cstring_to_text(GetTableDDLCommand(ddlStatement));
wrapper->listCell = lnext_compat(wrapper->list, wrapper->listCell); wrapper->listCell = lnext(wrapper->list, wrapper->listCell);
SRF_RETURN_NEXT(functionContext, PointerGetDatum(ddlStatementText)); SRF_RETURN_NEXT(functionContext, PointerGetDatum(ddlStatementText));
} }

View File

@ -295,7 +295,7 @@ BuildSelectStatementViaStdPlanner(Query *combineQuery, List *remoteScanTargetLis
ReplaceCitusExtraDataContainer = true; ReplaceCitusExtraDataContainer = true;
ReplaceCitusExtraDataContainerWithCustomScan = remoteScan; ReplaceCitusExtraDataContainerWithCustomScan = remoteScan;
standardStmt = standard_planner_compat(combineQuery, 0, NULL); standardStmt = standard_planner(combineQuery, NULL, 0, NULL);
ReplaceCitusExtraDataContainer = false; ReplaceCitusExtraDataContainer = false;
ReplaceCitusExtraDataContainerWithCustomScan = NULL; ReplaceCitusExtraDataContainerWithCustomScan = NULL;

View File

@ -239,9 +239,9 @@ distributed_planner(Query *parse,
* restriction information per table and parse tree transformations made by * restriction information per table and parse tree transformations made by
* postgres' planner. * postgres' planner.
*/ */
planContext.plan = standard_planner_compat(planContext.query, planContext.plan = standard_planner(planContext.query, NULL,
planContext.cursorOptions, planContext.cursorOptions,
planContext.boundParams); planContext.boundParams);
if (needsDistributedPlanning) if (needsDistributedPlanning)
{ {
result = PlanDistributedStmt(&planContext, rteIdCounter); result = PlanDistributedStmt(&planContext, rteIdCounter);
@ -1024,7 +1024,7 @@ CreateDistributedPlan(uint64 planId, Query *originalQuery, Query *query, ParamLi
* being contiguous. * being contiguous.
*/ */
standard_planner_compat(newQuery, 0, boundParams); standard_planner(newQuery, NULL, 0, boundParams);
/* overwrite the old transformed query with the new transformed query */ /* overwrite the old transformed query with the new transformed query */
*query = *newQuery; *query = *newQuery;

View File

@ -987,7 +987,7 @@ ReorderInsertSelectTargetLists(Query *originalQuery, RangeTblEntry *insertRte,
oldInsertTargetEntry->resname); oldInsertTargetEntry->resname);
/* see transformInsertRow() for the details */ /* see transformInsertRow() for the details */
if (IsA(oldInsertTargetEntry->expr, ArrayRef) || if (IsA(oldInsertTargetEntry->expr, SubscriptingRef) ||
IsA(oldInsertTargetEntry->expr, FieldStore)) IsA(oldInsertTargetEntry->expr, FieldStore))
{ {
ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE),
@ -1515,8 +1515,8 @@ CreateNonPushableInsertSelectPlan(uint64 planId, Query *parse, ParamListInfo bou
/* plan the subquery, this may be another distributed query */ /* plan the subquery, this may be another distributed query */
int cursorOptions = CURSOR_OPT_PARALLEL_OK; int cursorOptions = CURSOR_OPT_PARALLEL_OK;
PlannedStmt *selectPlan = pg_plan_query_compat(selectQueryCopy, NULL, cursorOptions, PlannedStmt *selectPlan = pg_plan_query(selectQueryCopy, NULL, cursorOptions,
boundParams); boundParams);
bool repartitioned = IsRedistributablePlan(selectPlan->planTree) && bool repartitioned = IsRedistributablePlan(selectPlan->planTree) &&
IsSupportedRedistributionTarget(targetRelationId); IsSupportedRedistributionTarget(targetRelationId);

View File

@ -376,7 +376,7 @@ RemoveLocalNodeFromWorkerList(List *workerNodeList)
WorkerNode *workerNode = (WorkerNode *) lfirst(workerNodeCell); WorkerNode *workerNode = (WorkerNode *) lfirst(workerNodeCell);
if (workerNode->groupId == localGroupId) if (workerNode->groupId == localGroupId)
{ {
return list_delete_cell_compat(workerNodeList, workerNodeCell, prev); return list_delete_cell(workerNodeList, workerNodeCell);
} }
} }

View File

@ -88,7 +88,7 @@ CacheLocalPlanForShardQuery(Task *task, DistributedPlan *originalDistributedPlan
LockRelationOid(rangeTableEntry->relid, lockMode); LockRelationOid(rangeTableEntry->relid, lockMode);
LocalPlannedStatement *localPlannedStatement = CitusMakeNode(LocalPlannedStatement); LocalPlannedStatement *localPlannedStatement = CitusMakeNode(LocalPlannedStatement);
localPlan = planner_compat(localShardQuery, 0, NULL); localPlan = planner(localShardQuery, NULL, 0, NULL);
localPlannedStatement->localPlan = localPlan; localPlannedStatement->localPlan = localPlan;
localPlannedStatement->shardId = task->anchorShardId; localPlannedStatement->shardId = task->anchorShardId;
localPlannedStatement->localGroupId = GetLocalGroupId(); localPlannedStatement->localGroupId = GetLocalGroupId();

View File

@ -358,8 +358,8 @@ ExplainSubPlans(DistributedPlan *distributedPlan, ExplainState *es)
ExplainOpenGroup("PlannedStmt", "PlannedStmt", false, es); ExplainOpenGroup("PlannedStmt", "PlannedStmt", false, es);
ExplainOnePlanCompat(plan, into, es, queryString, params, NULL, &planduration, ExplainOnePlan(plan, into, es, queryString, params, NULL, &planduration,
(es->buffers ? &bufusage : NULL)); (es->buffers ? &bufusage : NULL));
ExplainCloseGroup("PlannedStmt", "PlannedStmt", false, es); ExplainCloseGroup("PlannedStmt", "PlannedStmt", false, es);
ExplainCloseGroup("Subplan", NULL, true, es); ExplainCloseGroup("Subplan", NULL, true, es);
@ -1079,7 +1079,7 @@ worker_save_query_explain_analyze(PG_FUNCTION_ARGS)
INSTR_TIME_SET_CURRENT(planStart); INSTR_TIME_SET_CURRENT(planStart);
PlannedStmt *plan = pg_plan_query_compat(query, NULL, CURSOR_OPT_PARALLEL_OK, NULL); PlannedStmt *plan = pg_plan_query(query, NULL, CURSOR_OPT_PARALLEL_OK, NULL);
INSTR_TIME_SET_CURRENT(planDuration); INSTR_TIME_SET_CURRENT(planDuration);
INSTR_TIME_SUBTRACT(planDuration, planStart); INSTR_TIME_SUBTRACT(planDuration, planStart);
@ -1201,7 +1201,7 @@ CitusExplainOneQuery(Query *query, int cursorOptions, IntoClause *into,
SetLocalHideCitusDependentObjectsDisabledWhenAlreadyEnabled(); SetLocalHideCitusDependentObjectsDisabledWhenAlreadyEnabled();
/* plan the query */ /* plan the query */
PlannedStmt *plan = pg_plan_query_compat(query, NULL, cursorOptions, params); PlannedStmt *plan = pg_plan_query(query, NULL, cursorOptions, params);
INSTR_TIME_SET_CURRENT(planduration); INSTR_TIME_SET_CURRENT(planduration);
INSTR_TIME_SUBTRACT(planduration, planstart); INSTR_TIME_SUBTRACT(planduration, planstart);
@ -1213,8 +1213,8 @@ CitusExplainOneQuery(Query *query, int cursorOptions, IntoClause *into,
} }
/* run it (if needed) and produce output */ /* run it (if needed) and produce output */
ExplainOnePlanCompat(plan, into, es, queryString, params, queryEnv, ExplainOnePlan(plan, into, es, queryString, params, queryEnv,
&planduration, (es->buffers ? &bufusage : NULL)); &planduration, (es->buffers ? &bufusage : NULL));
} }
@ -1632,7 +1632,7 @@ ExplainOneQuery(Query *query, int cursorOptions,
INSTR_TIME_SET_CURRENT(planstart); INSTR_TIME_SET_CURRENT(planstart);
/* plan the query */ /* plan the query */
PlannedStmt *plan = pg_plan_query_compat(query, NULL, cursorOptions, params); PlannedStmt *plan = pg_plan_query(query, NULL, cursorOptions, params);
INSTR_TIME_SET_CURRENT(planduration); INSTR_TIME_SET_CURRENT(planduration);
INSTR_TIME_SUBTRACT(planduration, planstart); INSTR_TIME_SUBTRACT(planduration, planstart);
@ -1645,7 +1645,7 @@ ExplainOneQuery(Query *query, int cursorOptions,
} }
/* run it (if needed) and produce output */ /* run it (if needed) and produce output */
ExplainOnePlanCompat(plan, into, es, queryString, params, queryEnv, ExplainOnePlan(plan, into, es, queryString, params, queryEnv,
&planduration, (es->buffers ? &bufusage : NULL)); &planduration, (es->buffers ? &bufusage : NULL));
} }
} }

View File

@ -543,7 +543,7 @@ OrSelectClauseList(List *selectClauseList)
Node *selectClause = NULL; Node *selectClause = NULL;
foreach_ptr(selectClause, selectClauseList) foreach_ptr(selectClause, selectClauseList)
{ {
bool orClause = or_clause(selectClause); bool orClause = is_orclause(selectClause);
if (orClause) if (orClause)
{ {
orSelectClauseList = lappend(orSelectClauseList, selectClause); orSelectClauseList = lappend(orSelectClauseList, selectClause);
@ -3674,9 +3674,9 @@ CoordCombineAggOid()
static Oid static Oid
TypeOid(Oid schemaId, const char *typeName) TypeOid(Oid schemaId, const char *typeName)
{ {
Oid typeOid = GetSysCacheOid2Compat(TYPENAMENSP, Anum_pg_type_oid, Oid typeOid = GetSysCacheOid2(TYPENAMENSP, Anum_pg_type_oid,
PointerGetDatum(typeName), PointerGetDatum(typeName),
ObjectIdGetDatum(schemaId)); ObjectIdGetDatum(schemaId));
return typeOid; return typeOid;
} }

View File

@ -1236,7 +1236,7 @@ DeferErrorIfUnsupportedClause(List *clauseList)
{ {
Node *clause = (Node *) lfirst(clauseCell); Node *clause = (Node *) lfirst(clauseCell);
if (!(IsSelectClause(clause) || IsJoinClause(clause) || or_clause(clause))) if (!(IsSelectClause(clause) || IsJoinClause(clause) || is_orclause(clause)))
{ {
return DeferredError(ERRCODE_FEATURE_NOT_SUPPORTED, return DeferredError(ERRCODE_FEATURE_NOT_SUPPORTED,
"unsupported clause type", NULL, NULL); "unsupported clause type", NULL, NULL);

View File

@ -1214,7 +1214,7 @@ CreateDistributedSubPlan(uint32 subPlanId, Query *subPlanQuery)
} }
DistributedSubPlan *subPlan = CitusMakeNode(DistributedSubPlan); DistributedSubPlan *subPlan = CitusMakeNode(DistributedSubPlan);
subPlan->plan = planner_compat(subPlanQuery, cursorOptions, NULL); subPlan->plan = planner(subPlanQuery, NULL, cursorOptions, NULL);
subPlan->subPlanId = subPlanId; subPlan->subPlanId = subPlanId;
return subPlan; return subPlan;

View File

@ -165,7 +165,7 @@ ProgressMonitorList(uint64 commandTypeMagicNumber, List **attachedDSMSegments)
getProgressInfoFunctionOid, getProgressInfoFunctionOid,
commandTypeDatum); commandTypeDatum);
TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlotCompat( TupleTableSlot *tupleTableSlot = MakeSingleTupleTableSlot(
progressResultSet->setDesc, progressResultSet->setDesc,
&TTSOpsMinimalTuple); &TTSOpsMinimalTuple);

View File

@ -1646,7 +1646,7 @@ WaitForRelationSubscriptionsBecomeReady(MultiConnection *targetConnection,
* and reset it on every iteration to make sure we don't slowly build up * and reset it on every iteration to make sure we don't slowly build up
* a lot of memory. * a lot of memory.
*/ */
MemoryContext loopContext = AllocSetContextCreateExtended(CurrentMemoryContext, MemoryContext loopContext = AllocSetContextCreateInternal(CurrentMemoryContext,
"WaitForRelationSubscriptionsBecomeReady", "WaitForRelationSubscriptionsBecomeReady",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_INITSIZE,
@ -1928,7 +1928,7 @@ WaitForShardMoveSubscription(MultiConnection *targetConnection, XLogRecPtr sourc
* and reset it on every iteration to make sure we don't slowly build up * and reset it on every iteration to make sure we don't slowly build up
* a lot of memory. * a lot of memory.
*/ */
MemoryContext loopContext = AllocSetContextCreateExtended(CurrentMemoryContext, MemoryContext loopContext = AllocSetContextCreateInternal(CurrentMemoryContext,
"WaitForShardMoveSubscription", "WaitForShardMoveSubscription",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_INITSIZE,

View File

@ -51,10 +51,10 @@ partition_task_list_results(PG_FUNCTION_ARGS)
bool binaryFormat = PG_GETARG_BOOL(3); bool binaryFormat = PG_GETARG_BOOL(3);
Query *parsedQuery = ParseQueryString(queryString, NULL, 0); Query *parsedQuery = ParseQueryString(queryString, NULL, 0);
PlannedStmt *queryPlan = pg_plan_query_compat(parsedQuery, PlannedStmt *queryPlan = pg_plan_query(parsedQuery,
queryString, queryString,
CURSOR_OPT_PARALLEL_OK, CURSOR_OPT_PARALLEL_OK,
NULL); NULL);
if (!IsCitusCustomScan(queryPlan->planTree)) if (!IsCitusCustomScan(queryPlan->planTree))
{ {
ereport(ERROR, (errmsg("query must be distributed and shouldn't require " ereport(ERROR, (errmsg("query must be distributed and shouldn't require "
@ -122,10 +122,10 @@ redistribute_task_list_results(PG_FUNCTION_ARGS)
bool binaryFormat = PG_GETARG_BOOL(3); bool binaryFormat = PG_GETARG_BOOL(3);
Query *parsedQuery = ParseQueryString(queryString, NULL, 0); Query *parsedQuery = ParseQueryString(queryString, NULL, 0);
PlannedStmt *queryPlan = pg_plan_query_compat(parsedQuery, PlannedStmt *queryPlan = pg_plan_query(parsedQuery,
queryString, queryString,
CURSOR_OPT_PARALLEL_OK, CURSOR_OPT_PARALLEL_OK,
NULL); NULL);
if (!IsCitusCustomScan(queryPlan->planTree)) if (!IsCitusCustomScan(queryPlan->planTree))
{ {
ereport(ERROR, (errmsg("query must be distributed and shouldn't require " ereport(ERROR, (errmsg("query must be distributed and shouldn't require "

View File

@ -117,7 +117,7 @@ get_referencing_relation_id_list(PG_FUNCTION_ARGS)
{ {
Oid refId = lfirst_oid(wrapper->listCell); Oid refId = lfirst_oid(wrapper->listCell);
wrapper->listCell = lnext_compat(wrapper->list, wrapper->listCell); wrapper->listCell = lnext(wrapper->list, wrapper->listCell);
SRF_RETURN_NEXT(functionContext, PointerGetDatum(refId)); SRF_RETURN_NEXT(functionContext, PointerGetDatum(refId));
} }
@ -176,7 +176,7 @@ get_referenced_relation_id_list(PG_FUNCTION_ARGS)
{ {
Oid refId = lfirst_oid(wrapper->listCell); Oid refId = lfirst_oid(wrapper->listCell);
wrapper->listCell = lnext_compat(wrapper->list, wrapper->listCell); wrapper->listCell = lnext(wrapper->list, wrapper->listCell);
SRF_RETURN_NEXT(functionContext, PointerGetDatum(refId)); SRF_RETURN_NEXT(functionContext, PointerGetDatum(refId));
} }

View File

@ -76,7 +76,7 @@ get_foreign_key_to_reference_table_commands(PG_FUNCTION_ARGS)
char *command = (char *) lfirst(wrapper->listCell); char *command = (char *) lfirst(wrapper->listCell);
text *commandText = cstring_to_text(command); text *commandText = cstring_to_text(command);
wrapper->listCell = lnext_compat(wrapper->list, wrapper->listCell); wrapper->listCell = lnext(wrapper->list, wrapper->listCell);
SRF_RETURN_NEXT(functionContext, PointerGetDatum(commandText)); SRF_RETURN_NEXT(functionContext, PointerGetDatum(commandText));
} }

View File

@ -155,7 +155,7 @@ AllocateRelationAccessHash(void)
* management. Doing so, instead of allocating in TopMemoryContext, makes * management. Doing so, instead of allocating in TopMemoryContext, makes
* it easier to associate used memory. * it easier to associate used memory.
*/ */
RelationAcessContext = AllocSetContextCreateExtended(TopMemoryContext, RelationAcessContext = AllocSetContextCreateInternal(TopMemoryContext,
"Relation Access Context", "Relation Access Context",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_INITSIZE,

View File

@ -244,7 +244,7 @@ InitializeTransactionManagement(void)
AdjustMaxPreparedTransactions(); AdjustMaxPreparedTransactions();
/* set aside 8kb of memory for use in CoordinatedTransactionCallback */ /* set aside 8kb of memory for use in CoordinatedTransactionCallback */
CommitContext = AllocSetContextCreateExtended(TopMemoryContext, CommitContext = AllocSetContextCreateInternal(TopMemoryContext,
"CommitContext", "CommitContext",
8 * 1024, 8 * 1024,
8 * 1024, 8 * 1024,

View File

@ -165,7 +165,7 @@ RecoverWorkerTransactions(WorkerNode *workerNode)
return 0; return 0;
} }
MemoryContext localContext = AllocSetContextCreateExtended(CurrentMemoryContext, MemoryContext localContext = AllocSetContextCreateInternal(CurrentMemoryContext,
"RecoverWorkerTransactions", "RecoverWorkerTransactions",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,
ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_INITSIZE,

View File

@ -324,7 +324,7 @@ CreateForeignConstraintRelationshipGraph()
ClearForeignConstraintRelationshipGraphContext(); ClearForeignConstraintRelationshipGraphContext();
MemoryContext fConstraintRelationshipMemoryContext = AllocSetContextCreateExtended( MemoryContext fConstraintRelationshipMemoryContext = AllocSetContextCreateInternal(
CacheMemoryContext, CacheMemoryContext,
"Forign Constraint Relationship Graph Context", "Forign Constraint Relationship Graph Context",
ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_MINSIZE,

View File

@ -176,7 +176,7 @@ extern void AppendCopyBinaryFooters(CopyOutState footerOutputState);
extern void EndRemoteCopy(int64 shardId, List *connectionList); extern void EndRemoteCopy(int64 shardId, List *connectionList);
extern List * CreateRangeTable(Relation rel, AclMode requiredAccess); extern List * CreateRangeTable(Relation rel, AclMode requiredAccess);
extern Node * ProcessCopyStmt(CopyStmt *copyStatement, extern Node * ProcessCopyStmt(CopyStmt *copyStatement,
QueryCompletionCompat *completionTag, QueryCompletion *completionTag,
const char *queryString); const char *queryString);
extern void CheckCopyPermissions(CopyStmt *copyStatement); extern void CheckCopyPermissions(CopyStmt *copyStatement);
extern bool IsCopyResultStmt(CopyStmt *copyStatement); extern bool IsCopyResultStmt(CopyStmt *copyStatement);

View File

@ -84,13 +84,13 @@ extern void multi_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
#endif #endif
ProcessUtilityContext context, ParamListInfo params, ProcessUtilityContext context, ParamListInfo params,
struct QueryEnvironment *queryEnv, DestReceiver *dest, struct QueryEnvironment *queryEnv, DestReceiver *dest,
QueryCompletionCompat *completionTag QueryCompletion *completionTag
); );
extern void ProcessUtilityParseTree(Node *node, const char *queryString, extern void ProcessUtilityParseTree(Node *node, const char *queryString,
ProcessUtilityContext context, ParamListInfo ProcessUtilityContext context, ParamListInfo
params, params,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag QueryCompletion *completionTag
); );
extern void MarkInvalidateForeignKeyGraph(void); extern void MarkInvalidateForeignKeyGraph(void);
extern void InvalidateForeignKeyGraphForDDL(void); extern void InvalidateForeignKeyGraphForDDL(void);

View File

@ -52,7 +52,7 @@ typedef struct ListCellAndListWrapper
for (ListCell *(var ## CellDoNotUse) = list_head(l); \ for (ListCell *(var ## CellDoNotUse) = list_head(l); \
(var ## CellDoNotUse) != NULL && \ (var ## CellDoNotUse) != NULL && \
(((var) = lfirst(var ## CellDoNotUse)) || true); \ (((var) = lfirst(var ## CellDoNotUse)) || true); \
var ## CellDoNotUse = lnext_compat(l, var ## CellDoNotUse)) var ## CellDoNotUse = lnext(l, var ## CellDoNotUse))
/* /*
@ -65,7 +65,7 @@ typedef struct ListCellAndListWrapper
for (ListCell *(var ## CellDoNotUse) = list_head(l); \ for (ListCell *(var ## CellDoNotUse) = list_head(l); \
(var ## CellDoNotUse) != NULL && \ (var ## CellDoNotUse) != NULL && \
(((var) = lfirst_int(var ## CellDoNotUse)) || true); \ (((var) = lfirst_int(var ## CellDoNotUse)) || true); \
var ## CellDoNotUse = lnext_compat(l, var ## CellDoNotUse)) var ## CellDoNotUse = lnext(l, var ## CellDoNotUse))
/* /*
@ -78,7 +78,7 @@ typedef struct ListCellAndListWrapper
for (ListCell *(var ## CellDoNotUse) = list_head(l); \ for (ListCell *(var ## CellDoNotUse) = list_head(l); \
(var ## CellDoNotUse) != NULL && \ (var ## CellDoNotUse) != NULL && \
(((var) = lfirst_oid(var ## CellDoNotUse)) || true); \ (((var) = lfirst_oid(var ## CellDoNotUse)) || true); \
var ## CellDoNotUse = lnext_compat(l, var ## CellDoNotUse)) var ## CellDoNotUse = lnext(l, var ## CellDoNotUse))
/* /*
* forboth_ptr - * forboth_ptr -
@ -93,8 +93,8 @@ typedef struct ListCellAndListWrapper
(var2 ## CellDoNotUse) != NULL && \ (var2 ## CellDoNotUse) != NULL && \
(((var1) = lfirst(var1 ## CellDoNotUse)) || true) && \ (((var1) = lfirst(var1 ## CellDoNotUse)) || true) && \
(((var2) = lfirst(var2 ## CellDoNotUse)) || true); \ (((var2) = lfirst(var2 ## CellDoNotUse)) || true); \
var1 ## CellDoNotUse = lnext_compat(l1, var1 ## CellDoNotUse), \ var1 ## CellDoNotUse = lnext(l1, var1 ## CellDoNotUse), \
var2 ## CellDoNotUse = lnext_compat(l2, var2 ## CellDoNotUse) \ var2 ## CellDoNotUse = lnext(l2, var2 ## CellDoNotUse) \
) )
/* /*
@ -111,8 +111,8 @@ typedef struct ListCellAndListWrapper
(var2 ## CellDoNotUse) != NULL && \ (var2 ## CellDoNotUse) != NULL && \
(((var1) = lfirst(var1 ## CellDoNotUse)) || true) && \ (((var1) = lfirst(var1 ## CellDoNotUse)) || true) && \
(((var2) = lfirst_oid(var2 ## CellDoNotUse)) || true); \ (((var2) = lfirst_oid(var2 ## CellDoNotUse)) || true); \
var1 ## CellDoNotUse = lnext_compat(l1, var1 ## CellDoNotUse), \ var1 ## CellDoNotUse = lnext(l1, var1 ## CellDoNotUse), \
var2 ## CellDoNotUse = lnext_compat(l2, var2 ## CellDoNotUse) \ var2 ## CellDoNotUse = lnext(l2, var2 ## CellDoNotUse) \
) )
/* /*
@ -129,8 +129,8 @@ typedef struct ListCellAndListWrapper
(var2 ## CellDoNotUse) != NULL && \ (var2 ## CellDoNotUse) != NULL && \
(((var1) = lfirst_int(var1 ## CellDoNotUse)) || true) && \ (((var1) = lfirst_int(var1 ## CellDoNotUse)) || true) && \
(((var2) = lfirst_oid(var2 ## CellDoNotUse)) || true); \ (((var2) = lfirst_oid(var2 ## CellDoNotUse)) || true); \
var1 ## CellDoNotUse = lnext_compat(l1, var1 ## CellDoNotUse), \ var1 ## CellDoNotUse = lnext(l1, var1 ## CellDoNotUse), \
var2 ## CellDoNotUse = lnext_compat(l2, var2 ## CellDoNotUse) \ var2 ## CellDoNotUse = lnext(l2, var2 ## CellDoNotUse) \
) )
/* /*

View File

@ -123,37 +123,12 @@ RelationGetSmgr(Relation rel)
#define ROLE_PG_READ_ALL_STATS DEFAULT_ROLE_READ_ALL_STATS #define ROLE_PG_READ_ALL_STATS DEFAULT_ROLE_READ_ALL_STATS
#endif #endif
#define lnext_compat(l, r) lnext(l, r)
#define list_delete_cell_compat(l, c, p) list_delete_cell(l, c)
#define pg_plan_query_compat(p, q, c, b) pg_plan_query(p, q, c, b)
#define planner_compat(p, c, b) planner(p, NULL, c, b)
#define standard_planner_compat(a, c, d) standard_planner(a, NULL, c, d)
#define GetSequencesOwnedByRelation(a) getOwnedSequences(a)
#define GetSequencesOwnedByColumn(a, b) getOwnedSequences_internal(a, b, 0)
#define CMDTAG_SELECT_COMPAT CMDTAG_SELECT
#define ExplainOnePlanCompat(a, b, c, d, e, f, g, h) \
ExplainOnePlan(a, b, c, d, e, f, g, h)
#define SetListCellPtr(a, b) ((a)->ptr_value = (b)) #define SetListCellPtr(a, b) ((a)->ptr_value = (b))
#define RangeTableEntryFromNSItem(a) ((a)->p_rte) #define RangeTableEntryFromNSItem(a) ((a)->p_rte)
#define QueryCompletionCompat QueryCompletion
#define CreateTableSlotForRel(rel) table_slot_create(rel, NULL)
#define MakeSingleTupleTableSlotCompat MakeSingleTupleTableSlot
#define AllocSetContextCreateExtended AllocSetContextCreateInternal
#define NextCopyFromCompat NextCopyFrom
#define ArrayRef SubscriptingRef
#define T_ArrayRef T_SubscriptingRef
#define or_clause is_orclause
#define GetSysCacheOid1Compat GetSysCacheOid1
#define GetSysCacheOid2Compat GetSysCacheOid2
#define GetSysCacheOid3Compat GetSysCacheOid3
#define GetSysCacheOid4Compat GetSysCacheOid4
#define fcGetArgValue(fc, n) ((fc)->args[n].value) #define fcGetArgValue(fc, n) ((fc)->args[n].value)
#define fcGetArgNull(fc, n) ((fc)->args[n].isnull) #define fcGetArgNull(fc, n) ((fc)->args[n].isnull)
#define fcSetArgExt(fc, n, val, is_null) \ #define fcSetArgExt(fc, n, val, is_null) \
(((fc)->args[n].isnull = (is_null)), ((fc)->args[n].value = (val))) (((fc)->args[n].isnull = (is_null)), ((fc)->args[n].value = (val)))
#define fcSetArg(fc, n, value) fcSetArgExt(fc, n, value, false) #define fcSetArg(fc, n, value) fcSetArgExt(fc, n, value, false)
#define fcSetArgNull(fc, n) fcSetArgExt(fc, n, (Datum) 0, true) #define fcSetArgNull(fc, n) fcSetArgExt(fc, n, (Datum) 0, true)