summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/plpgsql.out14
-rw-r--r--src/test/regress/sql/plpgsql.sql11
2 files changed, 25 insertions, 0 deletions
diff --git a/src/test/regress/expected/plpgsql.out b/src/test/regress/expected/plpgsql.out
index 983f1b8b5a4..daf3447915d 100644
--- a/src/test/regress/expected/plpgsql.out
+++ b/src/test/regress/expected/plpgsql.out
@@ -4906,6 +4906,20 @@ select unreserved_test();
42
(1 row)
+create or replace function unreserved_test() returns int as $$
+declare
+ return int := 42;
+begin
+ return := return + 1;
+ return return;
+end
+$$ language plpgsql;
+select unreserved_test();
+ unreserved_test
+-----------------
+ 43
+(1 row)
+
drop function unreserved_test();
--
-- Test FOREACH over arrays
diff --git a/src/test/regress/sql/plpgsql.sql b/src/test/regress/sql/plpgsql.sql
index 2abcbc8d3cd..a0840c9dc8d 100644
--- a/src/test/regress/sql/plpgsql.sql
+++ b/src/test/regress/sql/plpgsql.sql
@@ -3940,6 +3940,17 @@ $$ language plpgsql;
select unreserved_test();
+create or replace function unreserved_test() returns int as $$
+declare
+ return int := 42;
+begin
+ return := return + 1;
+ return return;
+end
+$$ language plpgsql;
+
+select unreserved_test();
+
drop function unreserved_test();
--