1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-20 15:22:23 +03:00

Implement DO CONTINUE action for ECPG WHENEVER statement.

Author: Vinayak Pokale
Reviewed-By: Masahiko Sawada
This commit is contained in:
Michael Meskes
2017-08-25 15:15:03 +02:00
parent 3f4c7917b3
commit d22e9d5305
9 changed files with 361 additions and 0 deletions

View File

@ -4762,6 +4762,17 @@ EXEC SQL WHENEVER <replaceable>condition</replaceable> <replaceable>action</repl
</listitem>
</varlistentry>
<varlistentry>
<term><literal>DO CONTINUE</literal></term>
<listitem>
<para>
Execute the C statement <literal>continue</literal>. This should
only be used in loops statements. if executed, will cause the flow
of control to return to the top of the loop.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>CALL <replaceable>name</replaceable> (<replaceable>args</replaceable>)</literal></term>
<term><literal>DO <replaceable>name</replaceable> (<replaceable>args</replaceable>)</literal></term>
@ -7799,6 +7810,7 @@ WHENEVER { NOT FOUND | SQLERROR | SQLWARNING } <replaceable class="PARAMETER">ac
<programlisting>
EXEC SQL WHENEVER NOT FOUND CONTINUE;
EXEC SQL WHENEVER NOT FOUND DO BREAK;
EXEC SQL WHENEVER NOT FOUND DO CONTINUE;
EXEC SQL WHENEVER SQLWARNING SQLPRINT;
EXEC SQL WHENEVER SQLWARNING DO warn();
EXEC SQL WHENEVER SQLERROR sqlprint;