mirror of
https://github.com/postgres/postgres.git
synced 2025-09-05 02:22:28 +03:00
Remove AssertArg and AssertState
These don't offer anything over plain Assert, and their usage had already been declared obsolescent. Author: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/20221009210148.GA900071@nathanxps13
This commit is contained in:
@@ -2606,7 +2606,7 @@ get_db_info(const char *name, LOCKMODE lockmode,
|
||||
bool result = false;
|
||||
Relation relation;
|
||||
|
||||
AssertArg(name);
|
||||
Assert(name);
|
||||
|
||||
/* Caller may wish to grab a better lock on pg_database beforehand... */
|
||||
relation = table_open(DatabaseRelationId, AccessShareLock);
|
||||
|
@@ -2896,7 +2896,7 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind,
|
||||
* This matches the options enforced by the grammar, where the object name
|
||||
* is optional for DATABASE and SYSTEM.
|
||||
*/
|
||||
AssertArg(objectName || objectKind != REINDEX_OBJECT_SCHEMA);
|
||||
Assert(objectName || objectKind != REINDEX_OBJECT_SCHEMA);
|
||||
|
||||
if (objectKind == REINDEX_OBJECT_SYSTEM &&
|
||||
(params->options & REINDEXOPT_CONCURRENTLY) != 0)
|
||||
|
@@ -267,8 +267,8 @@ PortalCleanup(Portal portal)
|
||||
/*
|
||||
* sanity checks
|
||||
*/
|
||||
AssertArg(PortalIsValid(portal));
|
||||
AssertArg(portal->cleanup == PortalCleanup);
|
||||
Assert(PortalIsValid(portal));
|
||||
Assert(portal->cleanup == PortalCleanup);
|
||||
|
||||
/*
|
||||
* Shut down executor, if still running. We skip this during error abort,
|
||||
|
@@ -3134,7 +3134,7 @@ StoreCatalogInheritance(Oid relationId, List *supers,
|
||||
/*
|
||||
* sanity checks
|
||||
*/
|
||||
AssertArg(OidIsValid(relationId));
|
||||
Assert(OidIsValid(relationId));
|
||||
|
||||
if (supers == NIL)
|
||||
return;
|
||||
@@ -3651,7 +3651,7 @@ rename_constraint_internal(Oid myrelid,
|
||||
Form_pg_constraint con;
|
||||
ObjectAddress address;
|
||||
|
||||
AssertArg(!myrelid || !mytypid);
|
||||
Assert(!myrelid || !mytypid);
|
||||
|
||||
if (mytypid)
|
||||
{
|
||||
@@ -9731,7 +9731,7 @@ addFkRecurseReferencing(List **wqueue, Constraint *fkconstraint, Relation rel,
|
||||
Oid insertTriggerOid,
|
||||
updateTriggerOid;
|
||||
|
||||
AssertArg(OidIsValid(parentConstr));
|
||||
Assert(OidIsValid(parentConstr));
|
||||
|
||||
if (rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE)
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user