pgsql: Use castNode() in a bunch of statement-list-related code.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use castNode() in a bunch of statement-list-related code.
Date: 2017-01-27 03:09:41
Message-ID: E1cWwuz-0006a6-DM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2017-01-27 12:13:41 pgsql: Check interrupts during hot standby waits
Previous Message Michael Paquier 2017-01-27 02:24:16 Re: [COMMITTERS] pgsql: Check interrupts during hot standby waits