]> granicus.if.org Git - postgresql/commit
Use castNode() in a bunch of statement-list-related code.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 27 Jan 2017 03:09:34 +0000 (22:09 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 27 Jan 2017 03:09:34 +0000 (22:09 -0500)
commit7afd56c3c6d8360a5bfdfb2de30038b239fd756b
treedf9eb70bc951cdfe35629861285d5c6f31789ad7
parent9ba8a9ce4548bb34b7136b7463a61b2c499979a3
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.
20 files changed:
src/backend/catalog/pg_proc.c
src/backend/commands/createas.c
src/backend/commands/explain.c
src/backend/commands/extension.c
src/backend/commands/foreigncmds.c
src/backend/commands/portalcmds.c
src/backend/commands/prepare.c
src/backend/commands/tablecmds.c
src/backend/executor/functions.c
src/backend/executor/spi.c
src/backend/parser/gram.y
src/backend/parser/parse_expr.c
src/backend/parser/parse_type.c
src/backend/rewrite/rewriteDefine.c
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/tcop/utility.c
src/backend/utils/cache/plancache.c
src/backend/utils/mmgr/portalmem.c
src/pl/plpgsql/src/pl_exec.c