summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-08-23 17:34:47 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-08-23 17:34:47 -0400
commit18391a8f0649f40bb841e6492895551fd873f79b (patch)
treeebb980f82da8763218a0a04dad04e6a592d6a083 /src/test
parentaad663a0b4af785d0b245bbded27537f23932839 (diff)
Tweak wording of syntax error messages about bad CONTINUE/EXIT statements.
Try to avoid any possible confusion about what these messages mean.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/plpgsql.out8
-rw-r--r--src/test/regress/sql/plpgsql.sql2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/regress/expected/plpgsql.out b/src/test/regress/expected/plpgsql.out
index b10157bb170..c1822aadf0a 100644
--- a/src/test/regress/expected/plpgsql.out
+++ b/src/test/regress/expected/plpgsql.out
@@ -2843,7 +2843,7 @@ $$ language plpgsql;
ERROR: CONTINUE cannot be used outside a loop
LINE 4: continue;
^
--- should fail: EXIT is only legal inside a loop
+-- should fail: unlabeled EXIT is only legal inside a loop
create function exit_error1() returns void as $$
begin
begin
@@ -2851,7 +2851,7 @@ begin
end;
end;
$$ language plpgsql;
-ERROR: EXIT cannot be used outside a loop
+ERROR: EXIT cannot be used outside a loop, unless it has a label
LINE 4: exit;
^
-- should fail: no such label
@@ -2864,7 +2864,7 @@ begin
end;
end;
$$ language plpgsql;
-ERROR: label "no_such_label" does not exist
+ERROR: there is no label "no_such_label" surrounding this statement
LINE 5: continue no_such_label;
^
-- should fail: no such label
@@ -2877,7 +2877,7 @@ begin
end;
end;
$$ language plpgsql;
-ERROR: label "no_such_label" does not exist
+ERROR: there is no label "no_such_label" surrounding this statement
LINE 5: exit no_such_label;
^
-- should fail: CONTINUE can't reference the label of a named block
diff --git a/src/test/regress/sql/plpgsql.sql b/src/test/regress/sql/plpgsql.sql
index 7b4191ecf97..f883e7e0a21 100644
--- a/src/test/regress/sql/plpgsql.sql
+++ b/src/test/regress/sql/plpgsql.sql
@@ -2373,7 +2373,7 @@ begin
end;
$$ language plpgsql;
--- should fail: EXIT is only legal inside a loop
+-- should fail: unlabeled EXIT is only legal inside a loop
create function exit_error1() returns void as $$
begin
begin