summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-24 15:14:06 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-24 15:17:20 +0200
commita5b35fcedb542587e7d8b8fcd21a2e0995b82d2f (patch)
treee8fc20fe42313590549cc80ec3f16ca8ee39b526 /src/backend/commands/tablecmds.c
parent0fba25eb720a6a20b8f3c9597dd0417a0d20fc94 (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/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 3be2e051d32..fc89352b661 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -15995,7 +15995,7 @@ ATExecAlterColumnGenericOptions(Relation rel,
options,
fdw->fdwvalidator);
- if (PointerIsValid(DatumGetPointer(datum)))
+ if (DatumGetPointer(datum) != NULL)
repl_val[Anum_pg_attribute_attfdwoptions - 1] = datum;
else
repl_null[Anum_pg_attribute_attfdwoptions - 1] = true;
@@ -18673,7 +18673,7 @@ ATExecGenericOptions(Relation rel, List *options)
options,
fdw->fdwvalidator);
- if (PointerIsValid(DatumGetPointer(datum)))
+ if (DatumGetPointer(datum) != NULL)
repl_val[Anum_pg_foreign_table_ftoptions - 1] = datum;
else
repl_null[Anum_pg_foreign_table_ftoptions - 1] = true;