Thread: pgsql: Implement parser hooks for processing ColumnRef and ParamRef
pgsql: Implement parser hooks for processing ColumnRef and ParamRef
From
tgl@postgresql.org (Tom Lane)
Date:
Log Message: ----------- 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. Modified Files: -------------- pgsql/src/backend/catalog: namespace.c (r1.119 -> r1.120) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/namespace.c?r1=1.119&r2=1.120) pgsql/src/backend/parser: Makefile (r1.51 -> r1.52) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/Makefile?r1=1.51&r2=1.52) README (r1.10 -> r1.11) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/README?r1=1.10&r2=1.11) analyze.c (r1.395 -> r1.396) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c?r1=1.395&r2=1.396) parse_coerce.c (r2.177 -> r2.178) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_coerce.c?r1=2.177&r2=2.178) parse_expr.c (r1.246 -> r1.247) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_expr.c?r1=1.246&r2=1.247) parse_func.c (r1.217 -> r1.218) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_func.c?r1=1.217&r2=1.218) parse_node.c (r1.105 -> r1.106) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_node.c?r1=1.105&r2=1.106) parse_relation.c (r1.146 -> r1.147) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_relation.c?r1=1.146&r2=1.147) parse_target.c (r1.173 -> r1.174) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_target.c?r1=1.173&r2=1.174) pgsql/src/include/catalog: namespace.h (r1.60 -> r1.61) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/namespace.h?r1=1.60&r2=1.61) pgsql/src/include/parser: parse_node.h (r1.65 -> r1.66) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_node.h?r1=1.65&r2=1.66) parse_relation.h (r1.66 -> r1.67) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_relation.h?r1=1.66&r2=1.67) Added Files: ----------- pgsql/src/backend/parser: parse_param.c (r2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_param.c?rev=2.1&content-type=text/x-cvsweb-markup) pgsql/src/include/parser: parse_param.h (r1.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/parse_param.h?rev=1.1&content-type=text/x-cvsweb-markup)