From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Thom Brown <thombrown(at)gmail(dot)com> |
Subject: | Re: Command Triggers, v16 |
Date: | 2012-03-16 13:50:55 |
Message-ID: | 7291.1331905855@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> On Thursday, March 15, 2012 10:58:49 PM Dimitri Fontaine wrote:
>> I tricked that in the grammar, the type is called cmdtrigger but I
>> though it wouldn't be a good choice for the SQL statement.
> Hm. I am decidedly unhappy with that grammar hackery... But then maybe I am
> squeamish.
Multi-word type names are a serious pain in the ass; they require
hackery in a lot of places. We support the ones that the SQL spec
requires us to, but I will object in the strongest terms to inventing
any that are not required by spec. I object in even stronger terms to
the incredibly klugy way you did it here.
If you think "cmdtrigger" isn't a good name maybe you should have
picked a different one to start with.
While I'm looking at the grammar ... it also seems like a serious
PITA from a maintenance standpoint that we're now going to have to
adjust the CREATE COMMAND TRIGGER productions every time somebody
thinks of a new SQL command. Maybe we should drop this whole idea
of specifying which commands a trigger acts on at the SQL level,
and just have one-size-fits-all command triggers. Or perhaps have
the selection be on the basis of strings that are matched to command
tags, instead of grammar constructs.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Shigeru Hanada | 2012-03-16 13:51:57 | Re: Proposal: Create index on foreign table |
Previous Message | Alvaro Herrera | 2012-03-16 13:40:01 | Re: foreign key locks, 2nd attempt |