pgsql: Rename validate_relation_kind()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rename validate_relation_kind()
Date: 2026-02-23 16:43:30
Message-ID: E1vuZ1u-000qrN-1Y@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Rename validate_relation_kind()

There are three static definitions of validate_relation_kind() in the
codebase, one each in table.c, indexam.c and sequence.c, validating that
the given relation is a table, an index or a sequence respectively.
The compiler knows which definition to use where because they are static.
But this could be confusing to a reader. Rename these functions so that
their names reflect the kind of relation they are validating. While at
it, also update the comments in table.c to clarify the definition of
table-like relkinds so that we don't have to maintain the exclusion list
as the set of relkinds undergoes changes.

Author: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/6d3fef19-a420-4e11-8235-8ea534bf2080%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/797872f6b9c929a78677999c323ddc1ccb4e30d0

Modified Files
--------------
src/backend/access/index/indexam.c | 10 +++++-----
src/backend/access/sequence/sequence.c | 8 ++++----
src/backend/access/table/table.c | 18 +++++++++---------
3 files changed, 18 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2026-02-23 17:22:48 pgsql: Warn upon successful MD5 password authentication.
Previous Message Peter Eisentraut 2026-02-23 16:32:35 pgsql: Flip logic in table validate_relation_kind