pgsql: Transform ALTER TABLE/SET TYPE/USING expr during parse analysis - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Transform ALTER TABLE/SET TYPE/USING expr during parse analysis
Date
Msg-id E1Ye8LK-0004gH-2N@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Transform ALTER TABLE/SET TYPE/USING expr during parse analysis

This lets later stages have access to the transformed expression; in
particular it allows DDL-deparsing code during event triggers to pass
the transformed expression to ruleutils.c, so that the complete command
can be deparsed.

This shuffles the timing of the transform calls a bit: previously,
nothing was transformed during parse analysis, and only the
RELKIND_RELATION case was being handled during execution.  After this
patch, all expressions are transformed during parse analysis (including
those for relkinds other than RELATION), and the error for other
relation kinds is thrown only during execution.  So we do more work than
before to reject some bogus cases.  That seems acceptable.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9550e8348b7965715789089555bb5a3fda8c269c

Modified Files
--------------
src/backend/commands/tablecmds.c   |   35 +++++++------------------------
src/backend/parser/parse_utilcmd.c |   40 +++++++++++++++++++++++++++++++++---
2 files changed, 44 insertions(+), 31 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Add log_min_autovacuum_duration per-table option
Next
From: Tom Lane
Date:
Subject: pgsql: Remove unnecessary variables in _hash_splitbucket().