1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-24 00:23:06 +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:
Peter Eisentraut
2022-10-28 09:19:06 +02:00
parent d37aa3d358
commit b1099eca8f
44 changed files with 162 additions and 174 deletions

View File

@@ -177,7 +177,7 @@ CreatePortal(const char *name, bool allowDup, bool dupSilent)
{
Portal portal;
AssertArg(PointerIsValid(name));
Assert(PointerIsValid(name));
portal = GetPortalByName(name);
if (PortalIsValid(portal))
@@ -287,11 +287,11 @@ PortalDefineQuery(Portal portal,
List *stmts,
CachedPlan *cplan)
{
AssertArg(PortalIsValid(portal));
AssertState(portal->status == PORTAL_NEW);
Assert(PortalIsValid(portal));
Assert(portal->status == PORTAL_NEW);
AssertArg(sourceText != NULL);
AssertArg(commandTag != CMDTAG_UNKNOWN || stmts == NIL);
Assert(sourceText != NULL);
Assert(commandTag != CMDTAG_UNKNOWN || stmts == NIL);
portal->prepStmtName = prepStmtName;
portal->sourceText = sourceText;
@@ -468,7 +468,7 @@ MarkPortalFailed(Portal portal)
void
PortalDrop(Portal portal, bool isTopCommit)
{
AssertArg(PortalIsValid(portal));
Assert(PortalIsValid(portal));
/*
* Don't allow dropping a pinned portal, it's still needed by whoever