diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2025-09-24 15:14:06 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2025-09-24 15:17:20 +0200 |
commit | a5b35fcedb542587e7d8b8fcd21a2e0995b82d2f (patch) | |
tree | e8fc20fe42313590549cc80ec3f16ca8ee39b526 /src/backend/access/index/indexam.c | |
parent | 0fba25eb720a6a20b8f3c9597dd0417a0d20fc94 (diff) |
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 <jacob.champion@enterprisedb.com>
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
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r-- | src/backend/access/index/indexam.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 86d11f4ec79..0492d92d23b 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -75,7 +75,7 @@ #define RELATION_CHECKS \ do { \ Assert(RelationIsValid(indexRelation)); \ - Assert(PointerIsValid(indexRelation->rd_indam)); \ + Assert(indexRelation->rd_indam); \ if (unlikely(ReindexIsProcessingIndex(RelationGetRelid(indexRelation)))) \ ereport(ERROR, \ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \ @@ -85,9 +85,9 @@ do { \ #define SCAN_CHECKS \ ( \ - AssertMacro(IndexScanIsValid(scan)), \ + AssertMacro(scan), \ AssertMacro(RelationIsValid(scan->indexRelation)), \ - AssertMacro(PointerIsValid(scan->indexRelation->rd_indam)) \ + AssertMacro(scan->indexRelation->rd_indam) \ ) #define CHECK_REL_PROCEDURE(pname) \ |