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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d7be57ad85da54bf3c7e079e4941935e5d00fdf2
Modified Files
--------------
src/backend/access/table/table.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)