Re: CREATE EVENT TRIGGER syntax

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Joe Abbate <jma(at)freedomcircle(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE EVENT TRIGGER syntax
Date: 2013-08-09 13:12:03
Message-ID: CA+TgmoY-jBhEjFTNeDT5me4UdrUV9q1AAW+MsRSHESE-9U6C_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 5, 2013 at 4:53 PM, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> So do we want to keep that "AND" in the 9.3beta and 9.4 documentation?
>
> The grammar as in gram.y still allows the AND form, and I think we're
> used to maintain documentation that matches the code here. So I think it
> makes sense to remove both capabilities as we failed to deliver any
> other filter.
>
> But if we wanted to clean that, what about having the grammar check for
> the only one item we support rather than waiting until into
> CreateEventTrigger() to ereport a syntax error?

I have found that it's generally better to recognize such errors in
the post-parse phase rather than during parsing. When you start
adding more options, that tends to quickly become the only workable
option anyway.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2013-08-09 14:14:34 Re: Proposal for XML Schema Validation
Previous Message Dimitri Fontaine 2013-08-09 13:08:45 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])