1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Add PL/PgSQL FOUND and GET DIAGNOSTICS support for RETURN QUERY

statement

Pavel Stehule
This commit is contained in:
Bruce Momjian
2009-02-05 15:25:49 +00:00
parent 78cbd49826
commit 8c78f8e65c
4 changed files with 71 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.137 2009/02/04 21:30:41 alvherre Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.138 2009/02/05 15:25:49 momjian Exp $ -->
<chapter id="plpgsql">
<title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title>
@ -1356,6 +1356,14 @@ GET DIAGNOSTICS integer_var = ROW_COUNT;
execution of other statements within the loop body.
</para>
</listitem>
<listitem>
<para>
A <command>RETURN QUERY</command> and <command>RETURN QUERY
EXECUTE</command> statements set <literal>FOUND</literal>
true if the query returns at least one row, false if no row
is returned.
</para>
</listitem>
</itemizedlist>
<literal>FOUND</literal> is a local variable within each