mirror of https://github.com/citusdata/citus.git
Remove AssertArg and AssertState (#6970)
PG16 removed them. They were already identical to Assert. We can merge
this directly to main branch
Relevant PG commit:
b1099eca8f
b1099eca8f38ff5cfaf0901bb91cb6a22f909bc6
Co-authored-by: onderkalaci <onderkalaci@gmail.com>
pull/6969/head
parent
3fda2c3254
commit
48f068d08e
|
@ -109,7 +109,7 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
|
|||
colliculocale = NULL;
|
||||
}
|
||||
|
||||
AssertArg((collcollate && collctype) || colliculocale);
|
||||
Assert((collcollate && collctype) || colliculocale);
|
||||
#else
|
||||
|
||||
/*
|
||||
|
|
|
@ -222,7 +222,7 @@ ExtractDefaultColumnsAndOwnedSequences(Oid relationId, List **columnNameList,
|
|||
bool
|
||||
ColumnDefaultsToNextVal(Oid relationId, AttrNumber attrNumber)
|
||||
{
|
||||
AssertArg(AttributeNumberIsValid(attrNumber));
|
||||
Assert(AttributeNumberIsValid(attrNumber));
|
||||
|
||||
Relation relation = RelationIdGetRelation(relationId);
|
||||
Node *defExpr = build_column_default(relation, attrNumber);
|
||||
|
|
|
@ -501,8 +501,8 @@ ProcessUtilityInternal(PlannedStmt *pstmt,
|
|||
VariableSetStmt *setStmt = (VariableSetStmt *) parsetree;
|
||||
|
||||
/* at present, we only implement the NONE and LOCAL behaviors */
|
||||
AssertState(PropagateSetCommands == PROPSETCMD_NONE ||
|
||||
PropagateSetCommands == PROPSETCMD_LOCAL);
|
||||
Assert(PropagateSetCommands == PROPSETCMD_NONE ||
|
||||
PropagateSetCommands == PROPSETCMD_LOCAL);
|
||||
|
||||
if (IsMultiStatementTransaction() && ShouldPropagateSetCommand(setStmt))
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ PostprocessVariableSetStmt(VariableSetStmt *setStmt, const char *setStmtString)
|
|||
List *connectionList = NIL;
|
||||
|
||||
/* at present we only support SET LOCAL and SET TRANSACTION */
|
||||
AssertArg(ShouldPropagateSetCommand(setStmt));
|
||||
Assert(ShouldPropagateSetCommand(setStmt));
|
||||
|
||||
/* haven't seen any SET stmts so far in this (sub-)xact: initialize StringInfo */
|
||||
if (activeSetStmts == NULL)
|
||||
|
|
|
@ -183,7 +183,7 @@ CheckConninfo(const char *conninfo, const char **allowedConninfoKeywords,
|
|||
const char *prev = allowedConninfoKeywords[keywordIdx - 1];
|
||||
const char *curr = allowedConninfoKeywords[keywordIdx];
|
||||
|
||||
AssertArg(strcmp(prev, curr) < 0);
|
||||
Assert(strcmp(prev, curr) < 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ GeneratePlaceHolderPlannedStmt(Query *parse)
|
|||
|
||||
Node *distKey PG_USED_FOR_ASSERTS_ONLY = NULL;
|
||||
|
||||
AssertArg(FastPathRouterQuery(parse, &distKey));
|
||||
Assert(FastPathRouterQuery(parse, &distKey));
|
||||
|
||||
/* there is only a single relation rte */
|
||||
scanNode->scanrelid = 1;
|
||||
|
|
|
@ -622,7 +622,7 @@ DistributedInsertSelectSupported(Query *queryTree, RangeTblEntry *insertRte,
|
|||
ListCell *rangeTableCell = NULL;
|
||||
|
||||
/* we only do this check for INSERT ... SELECT queries */
|
||||
AssertArg(InsertSelectIntoCitusTable(queryTree));
|
||||
Assert(InsertSelectIntoCitusTable(queryTree));
|
||||
|
||||
Query *subquery = subqueryRte->subquery;
|
||||
|
||||
|
|
|
@ -2985,7 +2985,7 @@ AppendTargetEntryToGroupClause(TargetEntry *targetEntry,
|
|||
Expr *targetExpr PG_USED_FOR_ASSERTS_ONLY = targetEntry->expr;
|
||||
|
||||
/* we currently only support appending Var target entries */
|
||||
AssertArg(IsA(targetExpr, Var));
|
||||
Assert(IsA(targetExpr, Var));
|
||||
|
||||
Var *targetColumn = (Var *) targetEntry->expr;
|
||||
SortGroupClause *groupByClause = CreateSortGroupClause(targetColumn);
|
||||
|
|
Loading…
Reference in New Issue