Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xd1vQ-0007ys-55 for pgsql-committers@arkaria.postgresql.org; Sat, 11 Oct 2014 19:01:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xd1vP-0007g2-L7 for pgsql-committers@arkaria.postgresql.org; Sat, 11 Oct 2014 19:01:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xd1vO-0007fv-Mr for pgsql-committers@postgresql.org; Sat, 11 Oct 2014 19:01:54 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xd1vK-0003ez-CY; Sat, 11 Oct 2014 19:01:53 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Xd1vI-0006l9-1B; Sat, 11 Oct 2014 15:01:48 -0400 Date: Sat, 11 Oct 2014 15:01:48 -0400 From: Bruce Momjian To: Jeff Davis Cc: Kevin Grittner , pgsql-committers@postgresql.org Subject: Re: pgsql: Fix documentation template for CREATE TRIGGER. Message-ID: <20141011190148.GD21267@momjian.us> References: <1403464789.9081.11.camel@jeff-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1403464789.9081.11.camel@jeff-desktop> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org 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 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