pgsql: Implement parser hooks for processing ColumnRef and ParamRef - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Implement parser hooks for processing ColumnRef and ParamRef
Date
Msg-id 20091031014131.B0786753FB7@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Make the overflow guards in ExecChooseHashTableSize be more
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Ensure the previous Perl interpreter selection is restored upon