Re: Add CREATE support to event triggers

From: Jim Nasby <jim(at)nasby(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add CREATE support to event triggers
Date: 2014-06-15 00:44:03
Message-ID: 539CEC53.5030509@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/6/14, 11:20 AM, Alvaro Herrera wrote:
> NOTICE: JSON blob: {
> "definition": [
> {
> "clause": "owned",
> "fmt": "OWNED BY %{owner}D",
> "owner": {
> "attrname": "a",
> "objname": "t1",
> "schemaname": "public"
> }
> }
> ],
> "fmt": "ALTER SEQUENCE %{identity}D %{definition: }s",
> "identity": {
> "objname": "t1_a_seq",
> "schemaname": "public"
> }
> }
> NOTICE: expanded: ALTER SEQUENCE public.t1_a_seq OWNED BY public.t1.a

Apologies if this has been discussed and I missed it, but shouldn't part of the JSON be a field that indicates what command is being run? It doesn't seem wise to conflate detecting what the command is with the overall format string.
--
Jim C. Nasby, Data Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-06-15 01:12:21 Atomics hardware support table & supported architectures
Previous Message Andres Freund 2014-06-15 00:39:27 Re: UPDATE SET (a,b,c) = (SELECT ...) versus rules