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
Naisila Puka 2023-06-05 13:25:21 +03:00 committed by GitHub
parent 3fda2c3254
commit 48f068d08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View File

@ -109,7 +109,7 @@ CreateCollationDDLInternal(Oid collationId, Oid *collowner, char **quotedCollati
colliculocale = NULL;
}
AssertArg((collcollate && collctype) || colliculocale);
Assert((collcollate && collctype) || colliculocale);
#else
/*

View File

@ -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);

View File

@ -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))
{

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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);