Re: Add CREATE support to event triggers

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add CREATE support to event triggers
Date: 2014-09-25 21:59:31
Message-ID: 20140925215931.GB5311@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Actually here's a different split of these patches, which I hope makes
more sense. My intention here is that patches 0001 to 0004 are simple
changes that can be pushed right away; they are not directly related to
the return-creation-command feature. Patches 0005 to 0027 implement
that feature incrementally. You can see in patch 0005 the DDL commands
that are still not implemented in deparse (they are the ones that have
an elog(ERROR) rather than a "command = NULL"). Patch 0006 adds calls
in ProcessUtilitySlow() to each command, so that the object(s) being
touched are added to the event trigger command stash.

Patches from 0007 to 0027 (excepting patch 0017) implement one or a
small number of commands in deparse. Patch 0017 is necessary
infrastructure in ALTER TABLE to support deparsing that one.

My intention with the later patches is that they would all be pushed as
a single commit, i.e. the deparse support would be implemented for all
commands in a fell swoop rather than piecemeal -- except possibly patch
0017 (the ALTER TABLE infrastructure). I split them up only for ease of
review. Of course, before pushing we (I) need to implement deparsing
for all the remaining commands.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-deparse-core-split-builtins.h-to-new-ruleutils.h.patch text/x-diff 6.7 KB
0002-deparse-core-have-RENAME-return-attribute-number.patch text/x-diff 4.9 KB
0003-deparse-core-event-triggers-support-GRANT-REVOKE.patch text/x-diff 3.7 KB
0004-deparse-core-event-triggers-support-COMMENT.patch text/x-diff 4.6 KB
0005-deparse-infrastructure-needed-for-command-deparsing.patch text/x-diff 64.6 KB
0006-deparse-sprinkle-EventTriggerStashCommand-calls.patch text/x-diff 19.4 KB
0007-deparse-Support-CREATE-TYPE-AS.patch text/x-diff 8.3 KB
0008-deparse-Support-CREATE-TYPE-AS-ENUM.patch text/x-diff 1.9 KB
0009-deparse-Support-CREATE-SCHEMA-TABLE-SEQUENCE-INDEX-T.patch text/x-diff 45.3 KB
0010-deparse-Support-CREATE-TYPE-AS-RANGE.patch text/x-diff 4.2 KB
0011-deparse-Support-CREATE-EXTENSION.patch text/x-diff 3.5 KB
0012-deparse-Support-CREATE-RULE.patch text/x-diff 6.8 KB
0013-deparse-Support-ALTER-TYPE-ADD-VALUE-enums.patch text/x-diff 1.9 KB
0014-deparse-Support-for-ALTER-OBJECT-RENAME.patch text/x-diff 9.3 KB
0015-deparse-Support-CREATE-DOMAIN.patch text/x-diff 2.5 KB
0016-deparse-Support-CREATE-FUNCTION.patch text/x-diff 12.0 KB
0017-deparse-core-have-ALTER-TABLE-return-OIDs-and-col-of.patch text/x-diff 37.0 KB
0018-deparse-Support-ALTER-TABLE.patch text/x-diff 23.2 KB
0019-deparse-Support-CREATE-VIEW.patch text/x-diff 3.0 KB
0020-deparse-Support-CREATE-OPERATOR-FAMILY.patch text/x-diff 2.2 KB
0021-deparse-Support-CREATE-CONVERSION.patch text/x-diff 2.5 KB
0022-deparse-Support-DefineStmt-commands.patch text/x-diff 25.5 KB
0023-deparse-support-ALTER-THING-OWNER-TO.patch text/x-diff 1.5 KB
0024-deparse-Support-ALTER-EXTENSION-UPDATE-TO.patch text/x-diff 2.1 KB
0025-deparse-Support-GRANT-REVOKE.patch text/x-diff 15.4 KB
0026-deparse-Support-ALTER-FUNCTION.patch text/x-diff 3.8 KB
0027-deparse-support-COMMENT-ON.patch text/x-diff 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-09-25 22:03:34 Re: better atomics - v0.6
Previous Message Peter Geoghegan 2014-09-25 21:38:36 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}