Rename validate_relation_kind()
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-02-23T16:38:06Z
Releases:
19 (unreleased)
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.bapat.oss@gmail.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/6d3fef19-a420-4e11-8235-8ea534bf2080%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/index/indexam.c | modified | +5 −5 |
| src/backend/access/sequence/sequence.c | modified | +4 −4 |
| src/backend/access/table/table.c | modified | +9 −9 |
Discussion
- some validate_relation_kind() tidying 5 messages · 2026-02-18 → 2026-02-24