From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Kevin Grittner <kgrittn(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Fix documentation template for CREATE TRIGGER. |
Date: | 2015-01-10 00:20:37 |
Message-ID: | 20150110002037.GF26812@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Sun, Jun 22, 2014 at 12:19:49PM -0700, Jeff Davis wrote:
> On Sat, 2014-06-21 at 14:21 +0000, Kevin Grittner wrote:
> > Fix documentation template for CREATE TRIGGER.
> >
> > By using curly braces, the template had specified that one of
> > "NOT DEFERRABLE", "INITIALLY IMMEDIATE", or "INITIALLY DEFERRED"
> > was required on any CREATE TRIGGER statement, which is not
> > accurate. Change to square brackets makes that optional.
> >
> > Backpatch to 9.1, where the error was introduced.
>
> It still doesn't look quite right to me. The new form:
>
> [ NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY
> DEFERRED } ]
>
> says that, if DEFERRABLE is specified, then INITIALLY IMMEDIATE or
> INITIALLY DEFERRED is required. But the following is accepted by the
> server:
>
> create constraint trigger mytrigger
> after insert on dummy_table deferrable
> for each row execute procedure dummy_trigger();
>
> (Although the standard doesn't seem to have deferrable triggers, that
> does seem to match the deferrable constraint syntax that is in the
> spec.)
>
> For that matter, the following is also accepted by the server:
>
> create constraint trigger mytrigger
> after insert on dummy_table initially deferred deferrable
> for each row execute procedure dummy_trigger();
>
> That case may be a bug; and regardless I don't think we want to
> document/encourage specifying them in that order. But the first case
> seems reasonable to me.
I agree with both statements so I have applied the attached doc patch to
head.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
Attachment | Content-Type | Size |
---|---|---|
trigger.diff | text/x-diff | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-01-11 00:21:14 | pgsql: Fix alignment of pg_atomic_uint64 variables on some 32bit platfo |
Previous Message | Bruce Momjian | 2015-01-10 00:19:33 | pgsql: docs: improve CREATE TRIGGER defer options list |