Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPEGZ-0006R1-G8 for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Jul 2016 19:31:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bPEGZ-0002ji-34 for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Jul 2016 19:31:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bPEGY-0002j1-35 for pgsql-bugs@postgresql.org; Mon, 18 Jul 2016 19:31:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bPEGQ-0004Xy-Il for pgsql-bugs@postgresql.org; Mon, 18 Jul 2016 19:31:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6IJT9Dd014181; Mon, 18 Jul 2016 15:29:09 -0400 From: Tom Lane To: dpa-postgres@aegee.org cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14258: Documentation pl/pgsql In-reply-to: <20160718181437.1414.40802@wrigleys.postgresql.org> References: <20160718181437.1414.40802@wrigleys.postgresql.org> Comments: In-reply-to dpa-postgres@aegee.org message dated "Mon, 18 Jul 2016 18:14:37 -0000" Date: Mon, 18 Jul 2016 15:29:09 -0400 Message-ID: <14180.1468870149@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org dpa-postgres@aegee.org writes: > in doc/src/sgml/plpgsql.sgml please replace: > ... > because NOT NULL can be used only with {DEFAULT | := | =}. I'm disinclined to do that; it's not required by the plpgsql grammar, and in principle it might not be required at runtime either. In particular, if the variable is of a domain type it would be sensible for plpgsql to adopt the domain's default value if any. > For GET [CURRENT] DIAGNOSITCS (plpgsql.sgml, line 1441) the documentation > within pgpgsql.sgml is unclear, what is CURRENT supposed to do. Hmm, it's just a noise word, but I agree the docs ought to say that. > In , 1834 is written > IF ... THEN > CASE ... WHEN ... END CASE > More consistent would be to write IF ... THEN ... END IF Makes sense. > In Trigger Procedures, Triggers on Data Changes is stated, that the return > value of a row-level trigger is ignored. Does such a trigger have to > execute explicitly RETURN, contrary to functions returning void? Yes, I believe so; the documentation for RETURN does not make any exception for triggers. > In the example afterwards "A PL/pgSQL Trigger Procedure For Auditing", in > process_emp_audit() as AFTER trigger, the comment states, that the return > value is ignored, but why does the function have four return statements > instead of just one? [ shrug... ] Seems like reasonable coding style to me; for one thing, it would make it easier to copy-and-paste the example as a basis for a BEFORE trigger. I probably wouldn't have written it that way myself, but I don't feel a need to change it. > In subsection "Triggers on Events" please replace "is called as a event > trigger" with "is called as AN event trigger". Good catch, looks like there's a couple of those... Thanks for the notes! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs