From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename field "relkind" to "objtype" for CTAS and ALTER TABLE nod
Date: Sat, 11 Jul 2020 04:33:50 +0000
Message-ID: <E1ju7Cw-0002dh-Rp@gemulon.postgresql.org> (raw)
Rename field "relkind" to "objtype" for CTAS and ALTER TABLE nodes
"relkind" normally refers to the char field from pg_class. However, in
the parse nodes AlterTableStmt and CreateTableAsStmt, "relkind" was used
for a field of type enum ObjectType, that could refer to other object
types than those possible for a relkind. Such fields being usually
named "objtype", switch the name in both structures to make things more
consistent. Note that this led to some confusion in functions that
also operate on a RangeTableEntry object, which also has a field named
"relkind".
This naming goes back to commit 09d4e96, where only OBJECT_TABLE and
OBJECT_INDEX were used. This got extended later to use as well
OBJECT_TYPE with e440e12, not really a relation kind.
Author: Mark Dilger
Reviewed-by: Daniel Gustafsson, Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/609181AE-E399-47C7-9221-856E0F96BF93@enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cc35d8933a211d9965eb1c1d2749a903d5735db2
Modified Files
--------------
src/backend/commands/tablecmds.c | 4 ++--
src/backend/nodes/copyfuncs.c | 4 ++--
src/backend/nodes/equalfuncs.c | 4 ++--
src/backend/parser/analyze.c | 4 ++--
src/backend/parser/gram.y | 44 +++++++++++++++++++-------------------
src/backend/parser/parse_utilcmd.c | 6 +++---
src/backend/tcop/utility.c | 4 ++--
src/include/nodes/parsenodes.h | 4 ++--
8 files changed, 37 insertions(+), 37 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Rename field "relkind" to "objtype" for CTAS and ALTER TABLE nod
In-Reply-To: <E1ju7Cw-0002dh-Rp@gemulon.postgresql.org>
References: <E1ju7Cw-0002dh-Rp@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox