From a5b35fcedb542587e7d8b8fcd21a2e0995b82d2f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 24 Sep 2025 15:14:06 +0200 Subject: Remove PointerIsValid() This doesn't provide any value over the standard style of checking the pointer directly or comparing against NULL. Also remove related: - AllocPointerIsValid() [unused] - IndexScanIsValid() [had one user] - HeapScanIsValid() [unused] - InvalidRelation [unused] Leaving HeapTupleIsValid(), ItemIdIsValid(), PortalIsValid(), RelationIsValid for now, to reduce code churn. Reviewed-by: Jacob Champion Discussion: https://www.postgresql.org/message-id/flat/ad50ab6b-6f74-4603-b099-1cd6382fb13d%40eisentraut.org Discussion: https://www.postgresql.org/message-id/CA+hUKG+NFKnr=K4oybwDvT35dW=VAjAAfiuLxp+5JeZSOV3nBg@mail.gmail.com Discussion: https://www.postgresql.org/message-id/bccf2803-5252-47c2-9ff0-340502d5bd1c@iki.fi --- src/backend/utils/error/assert.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/backend/utils/error/assert.c') diff --git a/src/backend/utils/error/assert.c b/src/backend/utils/error/assert.c index 84b94f5e5f4..9dbd9efe41a 100644 --- a/src/backend/utils/error/assert.c +++ b/src/backend/utils/error/assert.c @@ -32,8 +32,7 @@ ExceptionalCondition(const char *conditionName, int lineNumber) { /* Report the failure on stderr (or local equivalent) */ - if (!PointerIsValid(conditionName) - || !PointerIsValid(fileName)) + if (!conditionName || !fileName) write_stderr("TRAP: ExceptionalCondition: bad arguments in PID %d\n", (int) getpid()); else -- cgit v1.2.3