pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dpa-postgres@aegee.org
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14258: Documentation pl/pgsql
Date: Mon, 18 Jul 2016 15:29:09 -0400
Message-ID: <14180.1468870149@sss.pgh.pa.us> (raw)
In-Reply-To: <20160718181437.1414.40802@wrigleys.postgresql.org>
References: <20160718181437.1414.40802@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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    <sect2 id="plpgsql-conditionals">, 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



view thread (6+ messages)  latest in thread

Message-ID: <14180.1468870149@sss.pgh.pa.us>
Permalink:  ../14180.1468870149@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14180.1468870149@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dpa-postgres@aegee.org
  Subject: Re: BUG #14258: Documentation pl/pgsql
  In-Reply-To: <14180.1468870149@sss.pgh.pa.us>
  References: <20160718181437.1414.40802@wrigleys.postgresql.org> <14180.1468870149@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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