From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Use castNode() in a bunch of statement-list-related code.
Date: Fri, 27 Jan 2017 03:09:41 +0000
Message-ID: <E1cWwuz-0006a6-DM@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Use castNode() in a bunch of statement-list-related code.
When I wrote commit ab1f0c822, I really missed the castNode() macro that
Peter E. had proposed shortly before. This back-fills the uses I would
have put it to. It's probably not all that significant, but there are
more assertions here than there were before, and conceivably they will
help catch any bugs associated with those representation changes.
I left behind a number of usages like "(Query *) copyObject(query_var)".
Those could have been converted as well, but Peter has proposed another
notational improvement that would handle copyObject cases automatically,
so I let that be for now.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/7afd56c3c6d8360a5bfdfb2de30038b239fd756b
Modified Files
--------------
src/backend/catalog/pg_proc.c | 2 +-
src/backend/commands/createas.c | 2 +-
src/backend/commands/explain.c | 15 ++++++---------
src/backend/commands/extension.c | 4 ++--
src/backend/commands/foreigncmds.c | 2 +-
src/backend/commands/portalcmds.c | 6 ++----
src/backend/commands/prepare.c | 6 ++----
src/backend/commands/tablecmds.c | 2 +-
src/backend/executor/functions.c | 4 ++--
src/backend/executor/spi.c | 18 +++++++++---------
src/backend/parser/gram.y | 2 +-
src/backend/parser/parse_expr.c | 6 ++----
src/backend/parser/parse_type.c | 2 +-
src/backend/rewrite/rewriteDefine.c | 10 +++++-----
src/backend/tcop/postgres.c | 12 +++++-------
src/backend/tcop/pquery.c | 6 +++---
src/backend/tcop/utility.c | 9 +++------
src/backend/utils/cache/plancache.c | 35 +++++++++++++----------------------
src/backend/utils/mmgr/portalmem.c | 4 +---
src/pl/plpgsql/src/pl_exec.c | 6 ++----
20 files changed, 63 insertions(+), 90 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Use castNode() in a bunch of statement-list-related code.
In-Reply-To: <E1cWwuz-0006a6-DM@gemulon.postgresql.org>
References: <E1cWwuz-0006a6-DM@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