pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix documentation template for CREATE TRIGGER.
8+ messages / 3 participants
[nested] [flat]

* pgsql: Fix documentation template for CREATE TRIGGER.
@ 2014-06-21 14:21 Kevin Grittner <kgrittn@postgresql.org>
  2014-06-22 19:19 ` Re: pgsql: Fix documentation template for CREATE TRIGGER. Jeff Davis <pgsql@j-davis.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Kevin Grittner @ 2014-06-21 14:21 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/734bea8a69db9ffd675a697f614e80baeb2ca854

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Fix documentation template for CREATE TRIGGER.
  2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
@ 2014-06-22 19:19 ` Jeff Davis <pgsql@j-davis.com>
  2014-10-11 19:01   ` Re: pgsql: Fix documentation template for CREATE TRIGGER. Bruce Momjian <bruce@momjian.us>
  2015-01-10 00:20   ` Re: pgsql: Fix documentation template for CREATE TRIGGER. Bruce Momjian <bruce@momjian.us>
  0 siblings, 2 replies; 8+ messages in thread

From: Jeff Davis @ 2014-06-22 19:19 UTC (permalink / raw)
  To: Kevin Grittner <kgrittn@postgresql.org>; +Cc: pgsql-committers

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.

Regards,
	Jeff Davis




-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Fix documentation template for CREATE TRIGGER.
  2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
  2014-06-22 19:19 ` Re: pgsql: Fix documentation template for CREATE TRIGGER. Jeff Davis <pgsql@j-davis.com>
@ 2014-10-11 19:01   ` Bruce Momjian <bruce@momjian.us>
  1 sibling, 0 replies; 8+ messages in thread

From: Bruce Momjian @ 2014-10-11 19:01 UTC (permalink / raw)
  To: Jeff Davis <pgsql@j-davis.com>; +Cc: Kevin Grittner <kgrittn@postgresql.org>; pgsql-committers


Did we ever address this concern?

---------------------------------------------------------------------------

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.
> 
> Regards,
> 	Jeff Davis
> 
> 
> 
> 
> -- 
> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Fix documentation template for CREATE TRIGGER.
  2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
  2014-06-22 19:19 ` Re: pgsql: Fix documentation template for CREATE TRIGGER. Jeff Davis <pgsql@j-davis.com>
@ 2015-01-10 00:20   ` Bruce Momjian <bruce@momjian.us>
  1 sibling, 0 replies; 8+ messages in thread

From: Bruce Momjian @ 2015-01-10 00:20 UTC (permalink / raw)
  To: Jeff Davis <pgsql@j-davis.com>; +Cc: Kevin Grittner <kgrittn@postgresql.org>; 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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Attachments:

trigger.diff (text/x-diff, 1.6K) download diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml new file mode 100644 index 29b815c..aae0b41 *** a/doc/src/sgml/ref/create_trigger.sgml --- b/doc/src/sgml/ref/create_trigger.sgml *************** PostgreSQL documentation *** 24,30 **** CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER | INSTEAD OF } { <replaceable class="PARAMETER">event</replaceable> [ OR ... ] } ON <replaceable class="PARAMETER">table_name</replaceable> [ FROM <replaceable class="parameter">referenced_table_name</replaceable> ] ! [ NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } ] [ FOR [ EACH ] { ROW | STATEMENT } ] [ WHEN ( <replaceable class="parameter">condition</replaceable> ) ] EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ( <replaceable class="PARAMETER">arguments</replaceable> ) --- 24,30 ---- CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER | INSTEAD OF } { <replaceable class="PARAMETER">event</replaceable> [ OR ... ] } ON <replaceable class="PARAMETER">table_name</replaceable> [ FROM <replaceable class="parameter">referenced_table_name</replaceable> ] ! [ NOT DEFERRABLE | [ DEFERRABLE ] [ INITIALLY IMMEDIATE | INITIALLY DEFERRED ] ] [ FOR [ EACH ] { ROW | STATEMENT } ] [ WHEN ( <replaceable class="parameter">condition</replaceable> ) ] EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ( <replaceable class="PARAMETER">arguments</replaceable> )
^ permalink raw reply [nested|flat] 8+ messages in thread

* pgsql: Fix documentation template for CREATE TRIGGER.
@ 2014-06-21 14:21 Kevin Grittner <kgrittn@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Kevin Grittner @ 2014-06-21 14:21 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bcd67a2fe97eaf3f83b5ddb72aaffff34f4d441f

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Fix documentation template for CREATE TRIGGER.
@ 2014-06-21 14:21 Kevin Grittner <kgrittn@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Kevin Grittner @ 2014-06-21 14:21 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/33b05485301f0f649fa30ba32c7b8b253f78ca8e

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Fix documentation template for CREATE TRIGGER.
@ 2014-06-21 14:21 Kevin Grittner <kgrittn@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Kevin Grittner @ 2014-06-21 14:21 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/07353de4fbcd7ee93a445dc6bf2bb32f05fffef1

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Fix documentation template for CREATE TRIGGER.
@ 2014-06-21 14:21 Kevin Grittner <kgrittn@postgresql.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Kevin Grittner @ 2014-06-21 14:21 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/cbc0517c3200af091cb95c35322555f4f6782da4

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2015-01-10 00:20 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
2014-06-22 19:19 ` Jeff Davis <pgsql@j-davis.com>
2014-10-11 19:01   ` Bruce Momjian <bruce@momjian.us>
2015-01-10 00:20   ` Bruce Momjian <bruce@momjian.us>
2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>
2014-06-21 14:21 pgsql: Fix documentation template for CREATE TRIGGER. Kevin Grittner <kgrittn@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox