BUG #14258: Documentation pl/pgsql

From: dpa-postgres(at)aegee(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14258: Documentation pl/pgsql
Date: 2016-07-18 18:14:37
Message-ID: 20160718181437.1414.40802@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14258
Logged by: Dilian Palauzov
Email address: dpa-postgres(at)aegee(dot)org
PostgreSQL version: 9.5.3
Operating system: any
Description:

Hello,

in doc/src/sgml/plpgsql.sgml please replace:

--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -328,7 +328,7 @@ arow RECORD;
<para>
The general syntax of a variable declaration is:
<synopsis>
-<replaceable>name</replaceable> <optional> CONSTANT </optional>
<replaceable>type</replaceable> <optional> COLLATE
<replaceable>collation_name</replaceable> </optional> <optional> NOT NULL
</optional> <optional> { DEFAULT | := | = }
<replaceable>expression</replaceable> </optional>;
+<replaceable>name</replaceable> <optional> CONSTANT </optional>
<replaceable>type</replaceable> <optional> COLLATE
<replaceable>collation_name</replaceable> </optional> <optional> <optional>
NOT NULL </optional>{ DEFAULT | := | = }
<replaceable>expression</replaceable> </optional>;
</synopsis>
The <literal>DEFAULT</> clause, if given, specifies the initial value
assigned
to the variable when the block is entered. If the <literal>DEFAULT</>
clause

because NOT NULL can be used only with {DEFAULT | := | =}. Keep in mind
that the mentioned line is so long, that it does not fit in the PDF/A4
documentation
(https://www.postgresql.org/files/documentation/pdf/9.5/postgresql-9.5-A4.pdf,
page 1063/1138).

For GET [CURRENT] DIAGNOSITCS (plpgsql.sgml, line 1441) the documentation
within pgpgsql.sgml is unclear, what is CURRENT supposed to do.

In <sect2 id="plpgsql-conditionals">, 1834 is written

IF ... THEN

CASE ... WHEN ... END CASE

More consistent would be to write IF ... THEN ... END IF

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?

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?

In subsection "Triggers on Events" please replace "is called as a event
trigger" with "is called as AN event trigger".

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-07-18 19:29:09 Re: BUG #14258: Documentation pl/pgsql
Previous Message John R Pierce 2016-07-18 17:54:29 Re: BUG #14255: Please provide 9.1.9 installation steps