diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index dead4c3..a32ba4f 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -4764,6 +4764,17 @@ EXEC SQL WHENEVER condition action
+ DO CONTINUE
+
+
+ Execute the C statement continue. This should
+ only be used in loops statements. if executed, will cause the flow
+ of control to return to the top of the loop.
+
+
+
+
+
CALL name (args)
DO name (args)
@@ -7800,6 +7811,7 @@ WHENEVER { NOT FOUND | SQLERROR | SQLWARNING } ac
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;
diff --git a/src/interfaces/ecpg/preproc/ecpg.trailer b/src/interfaces/ecpg/preproc/ecpg.trailer
index 1c10879..b42bca4 100644
--- a/src/interfaces/ecpg/preproc/ecpg.trailer
+++ b/src/interfaces/ecpg/preproc/ecpg.trailer
@@ -1454,6 +1454,12 @@ action : CONTINUE_P
$$.command = NULL;
$$.str = mm_strdup("break");
}
+ | DO CONTINUE_P
+ {
+ $$.code = W_CONTINUE;
+ $$.command = NULL;
+ $$.str = mm_strdup("continue");
+ }
| SQL_CALL name '(' c_args ')'
{
$$.code = W_DO;
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index 59d5d30..14d7066 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -51,6 +51,9 @@ print_action(struct when * w)
case W_BREAK:
fprintf(base_yyout, "break;");
break;
+ case W_CONTINUE:
+ fprintf(base_yyout, "continue;");
+ break;
default:
fprintf(base_yyout, "{/* %d not implemented yet */}", w->code);
break;