Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WynJ3-0004kQ-8A for pgsql-committers@arkaria.postgresql.org; Sun, 22 Jun 2014 19:20:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WynJ2-00057h-IR for pgsql-committers@arkaria.postgresql.org; Sun, 22 Jun 2014 19:20:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WynJ0-00057Y-IL for pgsql-committers@postgresql.org; Sun, 22 Jun 2014 19:19:58 +0000 Received: from mail-pd0-f174.google.com ([209.85.192.174]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1WynIs-0006Lo-QJ for pgsql-committers@postgresql.org; Sun, 22 Jun 2014 19:19:56 +0000 Received: by mail-pd0-f174.google.com with SMTP id y10so4794065pdj.19 for ; Sun, 22 Jun 2014 12:19:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=3x3EB5g/Jzbaqr4WpfKcXpdS+XFxdCts/xKo5bYCcjk=; b=RGucRtxqFMdbEVGcYM6i9OuAhwLMJsoghAcBNtBsJXAYsm1+7lQHs7bJNs0d9jeEIc ZAglHoOZkKCUmgc7Kzh3xs+VBJAx+t9ZbNGy1f4DzrCxWyDjpImIKn0L1J6HlNPO7v4Z 2ImPqUYj3DQ8VxkFmWFDZPFcibsz0b8NDOpQ9LGpbnORXlJJy19AfmdFdjgLEcgJnAft 1wOy0U5fN09XG+8y+G8+5uetuKP2LK0e8Ll2YOotVKbFNBA7txex/w0iokz2CDBKpApZ kQp8vrHe44+1RE3U/PSZrvXQmgzBdh5YMYLI2jcNkXBMT7ggSE0HY5BDor9+F30vEYyv C2cQ== X-Gm-Message-State: ALoCoQn381tVkWV6jgUW55r2zrNo3ytdCj8ybXpcJUdRjqMGqpV0BhVJx2HNw/OO2qpO5WgXU8V0 X-Received: by 10.66.100.163 with SMTP id ez3mr23518340pab.155.1403464789083; Sun, 22 Jun 2014 12:19:49 -0700 (PDT) Received: from [192.168.0.105] (c-69-181-249-16.hsd1.ca.comcast.net. [69.181.249.16]) by mx.google.com with ESMTPSA id fn2sm80658380pab.22.2014.06.22.12.19.47 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 22 Jun 2014 12:19:48 -0700 (PDT) Message-ID: <1403464789.9081.11.camel@jeff-desktop> Subject: Re: pgsql: Fix documentation template for CREATE TRIGGER. From: Jeff Davis To: Kevin Grittner Cc: pgsql-committers@postgresql.org Date: Sun, 22 Jun 2014 12:19:49 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 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