aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_funcs.c9
-rw-r--r--src/test/regress/expected/event_trigger.out34
-rw-r--r--src/test/regress/expected/plpgsql.out12
-rw-r--r--src/test/regress/expected/triggers.out10
4 files changed, 33 insertions, 32 deletions
diff --git a/src/pl/plpgsql/src/pl_funcs.c b/src/pl/plpgsql/src/pl_funcs.c
index 7b26970f468..900ba3c13b6 100644
--- a/src/pl/plpgsql/src/pl_funcs.c
+++ b/src/pl/plpgsql/src/pl_funcs.c
@@ -235,7 +235,7 @@ plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
case PLPGSQL_STMT_FOREACH_A:
return _("FOREACH over array");
case PLPGSQL_STMT_EXIT:
- return "EXIT";
+ return ((PLpgSQL_stmt_exit *) stmt)->is_exit ? "EXIT" : "CONTINUE";
case PLPGSQL_STMT_RETURN:
return "RETURN";
case PLPGSQL_STMT_RETURN_NEXT:
@@ -249,15 +249,16 @@ plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
case PLPGSQL_STMT_EXECSQL:
return _("SQL statement");
case PLPGSQL_STMT_DYNEXECUTE:
- return _("EXECUTE statement");
+ return "EXECUTE";
case PLPGSQL_STMT_DYNFORS:
return _("FOR over EXECUTE statement");
case PLPGSQL_STMT_GETDIAG:
- return "GET DIAGNOSTICS";
+ return ((PLpgSQL_stmt_getdiag *) stmt)->is_stacked ?
+ "GET STACKED DIAGNOSTICS" : "GET DIAGNOSTICS";
case PLPGSQL_STMT_OPEN:
return "OPEN";
case PLPGSQL_STMT_FETCH:
- return "FETCH";
+ return ((PLpgSQL_stmt_fetch *) stmt)->is_move ? "MOVE" : "FETCH";
case PLPGSQL_STMT_CLOSE:
return "CLOSE";
case PLPGSQL_STMT_PERFORM:
diff --git a/src/test/regress/expected/event_trigger.out b/src/test/regress/expected/event_trigger.out
index e70c315383a..95387a888b4 100644
--- a/src/test/regress/expected/event_trigger.out
+++ b/src/test/regress/expected/event_trigger.out
@@ -235,15 +235,15 @@ drop cascades to table schema_one."table two"
drop cascades to table schema_one.table_three
NOTICE: table "schema_two_table_two" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_two"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "audit_tbls_schema_two_table_three" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.audit_tbls_schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
ERROR: object audit_tbls.schema_two_table_three of type table cannot be dropped
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
DELETE FROM undroppable_objs WHERE object_identity = 'audit_tbls.schema_two_table_three';
DROP SCHEMA schema_one, schema_two CASCADE;
NOTICE: drop cascades to 7 other objects
@@ -256,21 +256,21 @@ drop cascades to table schema_one."table two"
drop cascades to table schema_one.table_three
NOTICE: table "schema_two_table_two" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_two"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "audit_tbls_schema_two_table_three" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.audit_tbls_schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "schema_one_table_one" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_one_table_one"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "schema_one_table two" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls."schema_one_table two""
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "schema_one_table_three" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_one_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
ERROR: object schema_one.table_three of type table cannot be dropped
DELETE FROM undroppable_objs WHERE object_identity = 'schema_one.table_three';
DROP SCHEMA schema_one, schema_two CASCADE;
@@ -284,21 +284,21 @@ drop cascades to table schema_one."table two"
drop cascades to table schema_one.table_three
NOTICE: table "schema_two_table_two" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_two"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "audit_tbls_schema_two_table_three" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.audit_tbls_schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_two_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "schema_one_table_one" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_one_table_one"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "schema_one_table two" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls."schema_one_table two""
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
NOTICE: table "schema_one_table_three" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.schema_one_table_three"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
SELECT * FROM dropped_objects WHERE schema IS NULL OR schema <> 'pg_toast';
type | schema | object
--------------+------------+-------------------------------------
@@ -330,7 +330,7 @@ SELECT * FROM dropped_objects WHERE schema IS NULL OR schema <> 'pg_toast';
DROP OWNED BY regression_bob;
NOTICE: schema "audit_tbls" does not exist, skipping
CONTEXT: SQL statement "DROP TABLE IF EXISTS audit_tbls.audit_tbls_schema_one_table_two"
-PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE statement
+PL/pgSQL function test_evtrig_dropped_objects() line 8 at EXECUTE
SELECT * FROM dropped_objects WHERE type = 'schema';
type | schema | object
--------+--------+------------
diff --git a/src/test/regress/expected/plpgsql.out b/src/test/regress/expected/plpgsql.out
index 828b4a030bc..452ef9d836d 100644
--- a/src/test/regress/expected/plpgsql.out
+++ b/src/test/regress/expected/plpgsql.out
@@ -3115,7 +3115,7 @@ begin
end$$ language plpgsql;
select footest();
ERROR: query returned no rows
-CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE statement
+CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE
create or replace function footest() returns void as $$
declare x record;
begin
@@ -3125,7 +3125,7 @@ begin
end$$ language plpgsql;
select footest();
ERROR: query returned more than one row
-CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE statement
+CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE
drop function footest();
-- test printing parameters after failure due to STRICT
set plpgsql.print_strict_params to true;
@@ -3177,7 +3177,7 @@ end$$ language plpgsql;
select footest();
ERROR: query returned no rows
DETAIL: parameters: $1 = '0', $2 = 'foo'
-CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE statement
+CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE
create or replace function footest() returns void as $$
declare x record;
begin
@@ -3188,7 +3188,7 @@ end$$ language plpgsql;
select footest();
ERROR: query returned more than one row
DETAIL: parameters: $1 = '1'
-CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE statement
+CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE
create or replace function footest() returns void as $$
declare x record;
begin
@@ -3198,7 +3198,7 @@ begin
end$$ language plpgsql;
select footest();
ERROR: query returned more than one row
-CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE statement
+CONTEXT: PL/pgSQL function footest() line 5 at EXECUTE
create or replace function footest() returns void as $$
-- override the global
#print_strict_params off
@@ -4237,7 +4237,7 @@ end;
$$ language plpgsql;
select stacked_diagnostics_test();
ERROR: GET STACKED DIAGNOSTICS cannot be used outside an exception handler
-CONTEXT: PL/pgSQL function stacked_diagnostics_test() line 6 at GET DIAGNOSTICS
+CONTEXT: PL/pgSQL function stacked_diagnostics_test() line 6 at GET STACKED DIAGNOSTICS
drop function zero_divide();
drop function stacked_diagnostics_test();
-- check cases where implicit SQLSTATE variable could be confused with
diff --git a/src/test/regress/expected/triggers.out b/src/test/regress/expected/triggers.out
index 3b32e8fdfe3..f5980c624c6 100644
--- a/src/test/regress/expected/triggers.out
+++ b/src/test/regress/expected/triggers.out
@@ -1493,7 +1493,7 @@ CONTEXT: SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
NOTICE: depth_c_tr: depth = 3
CONTEXT: SQL statement "insert into depth_c values (1)"
-PL/pgSQL function depth_b_tf() line 5 at EXECUTE statement
+PL/pgSQL function depth_b_tf() line 5 at EXECUTE
SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
NOTICE: SQLSTATE = U9999: depth = 2
@@ -1504,12 +1504,12 @@ CONTEXT: SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
NOTICE: depth_c_tr: depth = 3
CONTEXT: SQL statement "insert into depth_c values (1)"
-PL/pgSQL function depth_b_tf() line 12 at EXECUTE statement
+PL/pgSQL function depth_b_tf() line 12 at EXECUTE
SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
ERROR: U9999
CONTEXT: SQL statement "insert into depth_c values (1)"
-PL/pgSQL function depth_b_tf() line 12 at EXECUTE statement
+PL/pgSQL function depth_b_tf() line 12 at EXECUTE
SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
select pg_trigger_depth();
@@ -1525,12 +1525,12 @@ CONTEXT: SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
NOTICE: depth_c_tr: depth = 3
CONTEXT: SQL statement "insert into depth_c values (2)"
-PL/pgSQL function depth_b_tf() line 5 at EXECUTE statement
+PL/pgSQL function depth_b_tf() line 5 at EXECUTE
SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
NOTICE: depth_c_tr: depth = 3
CONTEXT: SQL statement "insert into depth_c values (2)"
-PL/pgSQL function depth_b_tf() line 5 at EXECUTE statement
+PL/pgSQL function depth_b_tf() line 5 at EXECUTE
SQL statement "insert into depth_b values (new.id)"
PL/pgSQL function depth_a_tf() line 4 at SQL statement
NOTICE: depth_b_tr: depth = 2