Flip logic in table validate_relation_kind
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-02-23T16:32:07Z
Releases:
19 (unreleased)
Flip logic in table validate_relation_kind It instead of checking which relkinds it shouldn't be, explicitly list the ones we accept. This is used to check which relkinds are accepted in table_open() and related functions. Before this change, figuring that out was always a few steps too complicated. This also makes changes for new relkinds more explicit instead of accidental. Finally, this makes this more aligned with the functions of the same name in src/backend/access/index/indexam.c and src/backend/access/sequence/sequence.c. Reviewed-by: 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/table/table.c | modified | +9 −4 |
Discussion
- some validate_relation_kind() tidying 5 messages · 2026-02-18 → 2026-02-24