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: Fix table_rewrite event trigger for ALTER TYPE/SET DATA TYPE CAS
Date: Fri, 27 Feb 2015 21:40:26 +0000
Message-ID: <E1YRSe2-0004GN-KY@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix table_rewrite event trigger for ALTER TYPE/SET DATA TYPE CASCADE

When a composite type being used in a typed table is modified by way
of ALTER TYPE, a table rewrite occurs appearing to come from ALTER TYPE.
The existing event_trigger.c code was unable to cope with that
and raised a spurious error.  The fix is just to accept that command
tag for the event, and document this properly.

Noted while fooling with deparsing of DDL commands.  This appears to be
an oversight in commit 618c9430a.

Thanks to Mark Wong for documentation wording help.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3f190f67eb45ae61d696fbce8ab48d246a12f709

Modified Files
--------------
doc/src/sgml/event-trigger.sgml             |    9 ++++-----
src/backend/commands/event_trigger.c        |    3 ++-
src/test/regress/expected/event_trigger.out |   11 +++++++++++
src/test/regress/sql/event_trigger.sql      |   10 ++++++++++
4 files changed, 27 insertions(+), 6 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: <E1YRSe2-0004GN-KY@gemulon.postgresql.org>
Permalink:  ../E1YRSe2-0004GN-KY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1YRSe2-0004GN-KY@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: Fix table_rewrite event trigger for ALTER TYPE/SET DATA TYPE CAS
  In-Reply-To: <E1YRSe2-0004GN-KY@gemulon.postgresql.org>
  References: <E1YRSe2-0004GN-KY@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