pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Transform ALTER TABLE/SET TYPE/USING expr during parse analysis
Date: Fri, 03 Apr 2015 20:37:30 +0000
Message-ID: <E1Ye8LK-0004gH-2N@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1Ye8LK-0004gH-2N@gemulon.postgresql.org>
Permalink:  ../E1Ye8LK-0004gH-2N@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Ye8LK-0004gH-2N@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Transform ALTER TABLE/SET TYPE/USING expr during parse analysis
  In-Reply-To: <E1Ye8LK-0004gH-2N@gemulon.postgresql.org>
  References: <E1Ye8LK-0004gH-2N@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox