OSDN Git Service

Implement parser hooks for processing ColumnRef and ParamRef nodes, as per my
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 31 Oct 2009 01:41:31 +0000 (01:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 31 Oct 2009 01:41:31 +0000 (01:41 +0000)
commitfb5d05805b3f7658e47ad2c6a4631e497bb3f627
tree74ee6327b45c313ac0ac21e92a3d61a52135cd2f
parent8442317beb8fb6f180880a977c03ccae4304df25
Implement parser hooks for processing ColumnRef and ParamRef nodes, as per my
recent proposal.  As proof of concept, remove knowledge of Params from the
core parser, arranging for them to be handled entirely by parser hook
functions.  It turns out we need an additional hook for that --- I had
forgotten about the code that handles inferring a parameter's type from
context.

This is a preliminary step towards letting plpgsql handle its variables
through parser hooks.  Additional work remains to be done to expose the
facility through SPI, but I think this is all the changes needed in the core
parser.
15 files changed:
src/backend/catalog/namespace.c
src/backend/parser/Makefile
src/backend/parser/README
src/backend/parser/analyze.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_node.c
src/backend/parser/parse_param.c [new file with mode: 0644]
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/include/catalog/namespace.h
src/include/parser/parse_node.h
src/include/parser/parse_param.h [new file with mode: 0644]
src/include/parser/parse_relation.h