From 5ee62d44e12852c9e1106bf10ebf6e892f17a092 Mon Sep 17 00:00:00 2001 From: totaj Date: Fri, 21 Apr 2023 17:56:45 +0800 Subject: [PATCH] Fix report wrong position for procedure error. --- src/common/backend/parser/gram.y | 13 +- .../expected/arrayinterface_single.out | 2 +- .../regress/expected/arrayinterface_ted.out | 25 +- .../regress/expected/autonomous_cursor.out | 36 +- src/test/regress/expected/b_compatibility.out | 70 +- .../expected/b_pg_plsql_show_all_error.out | 24 +- .../expected/char_truncation_common.out | 4 +- src/test/regress/expected/create_function.out | 6 +- .../expected/declare_multiple_variable.out | 40 +- src/test/regress/expected/function.out | 4 +- src/test/regress/expected/hw_cursor_part1.out | 24 +- src/test/regress/expected/hw_cursor_part7.out | 2 +- src/test/regress/expected/hw_cursor_part8.out | 2 +- .../regress/expected/hw_cursor_rollback.out | 48 +- .../expected/hw_cursor_rollback_ustore.out | 48 +- .../regress/expected/hw_explain_pretty1.out | 2 +- .../regress/expected/hw_func_return_out.out | 24 +- .../regress/expected/hw_grant_package.out | 6 +- src/test/regress/expected/hw_package.out | 111 +- .../regress/expected/hw_package_function.out | 6 +- .../regress/expected/hw_package_variable.out | 127 +- .../expected/hw_pct_type_and_rowtype.out | 8 +- .../regress/expected/hw_procedure_define.out | 104 +- src/test/regress/expected/mysql_condition.out | 18 +- src/test/regress/expected/mysql_syntax.out | 16 +- src/test/regress/expected/out_param_func.out | 2 +- .../regress/expected/pl_debugger_client.out | 66 +- .../regress/expected/pl_debugger_server.out | 8 +- .../plan_table_for_anonymous_block.out | 4 +- .../expected/pldeveloper_gs_source.out | 58 +- .../regress/expected/plpgsql_assign_list.out | 5 +- .../expected/plpgsql_cursor_rowtype.out | 6 +- .../regress/expected/plpgsql_inout_param.out | 60 +- .../regress/expected/plpgsql_override_out.out | 22 +- .../regress/expected/plpgsql_package_type.out | 67 +- .../expected/plpgsql_table_opengauss.out | 13 +- .../regress/expected/plsql_show_all_error.out | 118 +- .../regress/expected/select_where_func.out | 6 +- .../single_node_function_commit_rollback.out | 108 +- src/test/regress/output/comment_proc.source | 2530 ++++++++--------- src/test/regress/output/comment_proc_1.source | 2528 ++++++++-------- .../regress/output/mysql_delimiter_fix.source | 13 +- src/test/regress/output/mysql_function.source | 6 +- .../output/plpgsql_reset_session.source | 44 +- .../output/pri_create_any_function.source | 4 +- .../output/pri_execute_any_function.source | 4 +- .../select_into_user_defined_variables.source | 2 +- ...single_node_produce_commit_rollback.source | 100 +- src/test/regress/output/trigger_dump.source | 4 +- .../regress/output/view_definer_test.source | 3 +- src/test/regress/sql/hw_procedure_define.sql | 53 + 51 files changed, 3171 insertions(+), 3433 deletions(-) diff --git a/src/common/backend/parser/gram.y b/src/common/backend/parser/gram.y index 69afbd96e4..2e2deeb8d6 100644 --- a/src/common/backend/parser/gram.y +++ b/src/common/backend/parser/gram.y @@ -16709,16 +16709,19 @@ subprogram_body: { if (add_declare) { proc_body_str = (char *)palloc0(proc_body_len + DECLARE_LEN + 1); - strncpy(proc_body_str, DECLARE_STR, DECLARE_LEN + 1); - strncpy(proc_body_str + DECLARE_LEN, - yyextra->core_yy_extra.scanbuf + proc_b - 1, proc_body_len); + rc = strcpy_s(proc_body_str, proc_body_len + DECLARE_LEN + 1, DECLARE_STR); + securec_check(rc, "", ""); + rc = strncpy_s(proc_body_str + DECLARE_LEN, proc_body_len + 1, + yyextra->core_yy_extra.scanbuf + proc_b, proc_body_len - 1); + securec_check(rc, "", ""); proc_body_len = DECLARE_LEN + proc_body_len; } else { proc_body_str = (char *)palloc0(proc_body_len + 1); - strncpy(proc_body_str, - yyextra->core_yy_extra.scanbuf + proc_b - 1, proc_body_len); + rc = strncpy_s(proc_body_str, proc_body_len + 1, + yyextra->core_yy_extra.scanbuf + proc_b, proc_body_len - 1); + securec_check(rc, "", ""); } proc_body_str[proc_body_len] = '\0'; diff --git a/src/test/regress/expected/arrayinterface_single.out b/src/test/regress/expected/arrayinterface_single.out index 7b7afb8d55..f06112f97f 100644 --- a/src/test/regress/expected/arrayinterface_single.out +++ b/src/test/regress/expected/arrayinterface_single.out @@ -685,7 +685,7 @@ begin end; / ERROR: schema "colors" does not exist -CONTEXT: compilation of PL/pgSQL function "array_interface_p8" near line 7 +CONTEXT: compilation of PL/pgSQL function "array_interface_p8" near line 6 --call array_interface_p8(); -- test array exists interface A.B input parameter create or replace procedure array_interface_p9() diff --git a/src/test/regress/expected/arrayinterface_ted.out b/src/test/regress/expected/arrayinterface_ted.out index 91b4c25aad..a5ddbfa184 100644 --- a/src/test/regress/expected/arrayinterface_ted.out +++ b/src/test/regress/expected/arrayinterface_ted.out @@ -87,10 +87,9 @@ begin end; / ERROR: syntax error at or near "[" -LINE 6: colors.extend[1]; +LINE 5: colors.extend[1]; ^ -QUERY: -declare +QUERY: declare colors varchar[] := array['red']; begin raise NOTICE'%',colors; @@ -114,10 +113,9 @@ begin end; / ERROR: syntax error at or near "[" -LINE 6: colors.trim[1]; +LINE 5: colors.trim[1]; ^ -QUERY: -declare +QUERY: declare colors varchar[] := array['red','orange','green','blue','indigo','violet']; begin raise NOTICE'%',colors; @@ -151,10 +149,9 @@ begin end; / ERROR: syntax error at or near "[" -LINE 18: colors4.delete[-1]; +LINE 17: colors4.delete[-1]; ^ -QUERY: -declare +QUERY: declare colors varchar[] := array['red','orange','green','blue','indigo','violet']; colors2 varchar[] := array['red','orange','green','blue','indigo','violet']; colors3 varchar[] := array['red','orange','green','blue','indigo','violet']; @@ -212,10 +209,9 @@ begin end; / ERROR: syntax error at or near "@*" -LINE 3: @*ar& integer[]:=array[1,0,5,6,8,3,9]; +LINE 2: @*ar& integer[]:=array[1,0,5,6,8,3,9]; ^ -QUERY: -declare +QUERY: declare @*ar& integer[]:=array[1,0,5,6,8,3,9]; begin raise NOTICE'%',@*ar&; @@ -292,10 +288,9 @@ begin end; / ERROR: syntax error at or near "raise" -LINE 7: raise NOTICE'%',colors; +LINE 6: raise NOTICE'%',colors; ^ -QUERY: -declare +QUERY: declare colors varchar[] := array['red','orange','green','blue','indigo','violet']; begin raise NOTICE'%',colors; diff --git a/src/test/regress/expected/autonomous_cursor.out b/src/test/regress/expected/autonomous_cursor.out index f97582fc20..b00ad33b16 100644 --- a/src/test/regress/expected/autonomous_cursor.out +++ b/src/test/regress/expected/autonomous_cursor.out @@ -155,11 +155,11 @@ end pck1; call pck1.p1(); ERROR: ERROR: division by zero CONTEXT: SQL statement "SELECT 3/0" -PL/pgSQL function p2() line 8 at assignment +PL/pgSQL function p2() line 7 at assignment referenced column: p2 CONTEXT: SQL statement "CALL p2(c1)" -PL/pgSQL function p1() line 5 at SQL statement +PL/pgSQL function p1() line 4 at SQL statement drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -234,7 +234,7 @@ end pck1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -269,7 +269,7 @@ end pck1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -305,7 +305,7 @@ end pck1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -354,7 +354,7 @@ CONTEXT: PL/pgSQL function p2() during function exit referenced column: p2 CONTEXT: SQL statement "CALL p2(c1)" -PL/pgSQL function p1() line 5 at SQL statement +PL/pgSQL function p1() line 4 at SQL statement drop package pck1; NOTICE: drop cascades to 3 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -403,7 +403,7 @@ CONTEXT: PL/pgSQL function p2() during function exit referenced column: p2 CONTEXT: SQL statement "CALL p2(c1)" -PL/pgSQL function p1() line 5 at SQL statement +PL/pgSQL function p1() line 4 at SQL statement drop package pck1; NOTICE: drop cascades to 3 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -495,7 +495,7 @@ end pck1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -534,7 +534,7 @@ end pck1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -577,7 +577,7 @@ end pck1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -803,7 +803,7 @@ truncate table t1; call pck1.p1(); INFO: rowcount: ERROR: cursor variable "c1" is null in FETCH statement. -CONTEXT: PL/pgSQL function p1() line 7 at FETCH +CONTEXT: PL/pgSQL function p1() line 6 at FETCH drop package pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function pl_auto_ref.p1() @@ -1655,7 +1655,7 @@ end; call p1(); INFO: p2: CONTEXT: SQL statement "CALL p2(c1)" -PL/pgSQL function p1() line 4 at SQL statement +PL/pgSQL function p1() line 3 at SQL statement INFO: p1: p1 ---- @@ -1731,11 +1731,11 @@ ERROR: ERROR: deadlock detected --?* HINT: See server log for query details. CONTEXT: SQL statement "update t2_test set a=10" -PL/pgSQL function p2() line 6 at SQL statement +PL/pgSQL function p2() line 5 at SQL statement referenced column: p2 CONTEXT: SQL statement "CALL p2(c1)" -PL/pgSQL function p1() line 7 at SQL statement +PL/pgSQL function p1() line 6 at SQL statement select * from t2_test; a | b | c | d | e | f | g ---+-----+------+-------+----------+-------+------------ @@ -1839,11 +1839,11 @@ end; / ERROR: ERROR: autonomous procedure out ref cursor parameter can not be assigned DETAIL: procedure "p1()" out parameter "$1" not support to be assigned value -CONTEXT: PL/pgSQL function p1() line 4 at assignment +CONTEXT: PL/pgSQL function p1() line 3 at assignment referenced column: p1 CONTEXT: SQL statement "CALL p1(va)" -PL/pgSQL function inline_code_block line 4 at SQL statement +PL/pgSQL function inline_code_block line 3 at SQL statement create or replace procedure p1 (va out sys_refcursor) as PRAGMA AUTONOMOUS_TRANSACTION; @@ -1859,11 +1859,11 @@ end; / ERROR: ERROR: autonomous procedure out ref cursor parameter can not be assigned DETAIL: procedure "p1()" out parameter "va" not support to be assigned value -CONTEXT: PL/pgSQL function p1() line 4 at assignment +CONTEXT: PL/pgSQL function p1() line 3 at assignment referenced column: p1 CONTEXT: SQL statement "CALL p1(va)" -PL/pgSQL function inline_code_block line 4 at SQL statement +PL/pgSQL function inline_code_block line 3 at SQL statement drop table t1; drop procedure p1; -- test function with ref cursor diff --git a/src/test/regress/expected/b_compatibility.out b/src/test/regress/expected/b_compatibility.out index 78fe41d312..9babe837c6 100644 --- a/src/test/regress/expected/b_compatibility.out +++ b/src/test/regress/expected/b_compatibility.out @@ -953,7 +953,7 @@ raise notice 'p1:%',p1; end; / ERROR: 'ITERATE label' is only in database which dbcompatibility='B'. -CONTEXT: compilation of PL/pgSQL function "doiterate" near line 4 +CONTEXT: compilation of PL/pgSQL function "doiterate" near line 3 --error create or replace procedure doiterate(p1 int) as @@ -969,7 +969,7 @@ raise notice 'p1:%',p1; end; / ERROR: 'LEAVE label' is only in database which dbcompatibility='B'. -CONTEXT: compilation of PL/pgSQL function "doiterate" near line 5 +CONTEXT: compilation of PL/pgSQL function "doiterate" near line 4 --success create or replace procedure doiterate(p1 int) as @@ -1223,7 +1223,7 @@ NOTICE: identifier "label111111111111111111111111111111111111111111111111111111 NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" CONTEXT: compilation of PL/pgSQL function "proc_label" near line 1 NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" -CONTEXT: compilation of PL/pgSQL function "proc_label" near line 4 +CONTEXT: compilation of PL/pgSQL function "proc_label" near line 3 --success create or replace procedure proc_label1(n int) as @@ -1242,7 +1242,7 @@ NOTICE: identifier "label111111111111111111111111111111111111111111111111111111 NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" CONTEXT: compilation of PL/pgSQL function "proc_label1" near line 1 NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" -CONTEXT: compilation of PL/pgSQL function "proc_label1" near line 4 +CONTEXT: compilation of PL/pgSQL function "proc_label1" near line 3 call proc_label(5); proc_label ------------ @@ -1291,7 +1291,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 7 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement CREATE OR REPLACE FUNCTION func1(num1 in int, num2 inout int, res out int) RETURNS record AS $$ DECLARE @@ -1331,7 +1331,7 @@ end; NOTICE: 10,100 ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 8 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 7 at SQL statement create or replace procedure debug(num1 in int, num2 inout int, res out int) as begin num2 := num2 + 1; @@ -1363,7 +1363,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 7 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement create or replace procedure call(num1 in int, num2 inout int, res out int) as begin num2 := num2 + 1; @@ -1395,7 +1395,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 7 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement drop procedure call; CREATE OR REPLACE FUNCTION call() RETURNS int AS $$ @@ -1420,10 +1420,9 @@ call; end; / ERROR: syntax error at end of input -LINE 3: call; +LINE 2: call; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin call; end --error @@ -1434,7 +1433,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 3 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 2 at SQL statement --error declare begin @@ -1442,10 +1441,9 @@ call call; end; / ERROR: syntax error at end of input -LINE 3: call call; +LINE 2: call call; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin call call; end create schema test; @@ -1473,7 +1471,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 3 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 2 at SQL statement create or replace procedure test.debug(num1 in int, num2 inout int, res out int) as begin num2 := num2 + 1; @@ -1505,7 +1503,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 7 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement create or replace procedure test.call(num1 in int, num2 inout int, res out int) as begin num2 := num2 + 1; @@ -1537,7 +1535,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 7 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement drop procedure func_zzm; drop function func1; drop procedure debug; @@ -1700,10 +1698,9 @@ call; end; / ERROR: syntax error at end of input -LINE 3: call; +LINE 2: call; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin call; end --success @@ -1719,10 +1716,9 @@ call call; end; / ERROR: syntax error at end of input -LINE 3: call call; +LINE 2: call call; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin call call; end create schema test; @@ -2243,10 +2239,9 @@ the_while: end; / ERROR: while-loop syntax is mixed with while-do syntax -LINE 5: while _i < 10 loop +LINE 4: while _i < 10 loop ^ -QUERY: -declare _i integer = 0; +QUERY: declare _i integer = 0; BEGIN the_while: while _i < 10 loop @@ -2268,10 +2263,9 @@ BEGIN end; / ERROR: 'while-do' is only supported in database which dbcompatibility='B'. -LINE 4: while _i < 10 do +LINE 3: while _i < 10 do ^ -QUERY: -declare _i integer = 0; +QUERY: declare _i integer = 0; BEGIN while _i < 10 do _i := _i + 1; @@ -2292,10 +2286,9 @@ BEGIN end; / ERROR: while-loop syntax is mixed with while-do syntax -LINE 4: while _i < 10 loop +LINE 3: while _i < 10 loop ^ -QUERY: -declare _i integer = 0; +QUERY: declare _i integer = 0; BEGIN while _i < 10 loop _i := _i + 1; @@ -2319,7 +2312,7 @@ raise notice '%',i; end; / ERROR: 'repeat' is only supported in database which dbcompatibility='B'. -CONTEXT: compilation of PL/pgSQL function "dorepeat" near line 6 +CONTEXT: compilation of PL/pgSQL function "dorepeat" near line 5 --error CREATE or replace PROCEDURE dorepeat(p1 INT) as @@ -2334,7 +2327,7 @@ raise notice '%',i; end; / ERROR: 'repeat' is only supported in database which dbcompatibility='B'. -CONTEXT: compilation of PL/pgSQL function "dorepeat" near line 7 +CONTEXT: compilation of PL/pgSQL function "dorepeat" near line 6 --error CREATE or replace PROCEDURE dorepeat(p1 INT) as @@ -2349,7 +2342,7 @@ raise notice '%',i; end; / ERROR: 'label:' is only supported in database which dbcompatibility='B'. -CONTEXT: compilation of PL/pgSQL function "dorepeat" near line 3 +CONTEXT: compilation of PL/pgSQL function "dorepeat" near line 2 drop function if exists dorepeat; NOTICE: function dorepeat() does not exist, skipping \c b @@ -2449,10 +2442,9 @@ raise notice '%',i; end; / ERROR: The label name is invalid -LINE 5: repeat: +LINE 4: repeat: ^ -QUERY: -declare +QUERY: declare i int =0; BEGIN repeat: diff --git a/src/test/regress/expected/b_pg_plsql_show_all_error.out b/src/test/regress/expected/b_pg_plsql_show_all_error.out index 3f4394308d..d3d081695d 100644 --- a/src/test/regress/expected/b_pg_plsql_show_all_error.out +++ b/src/test/regress/expected/b_pg_plsql_show_all_error.out @@ -18,17 +18,16 @@ return n; end; / NOTICE: syntax error at or near "]" -LINE 4: n := v[]; +LINE 3: n := v[]; ^ -QUERY: DECLARE -n int; +QUERY: DECLARE n int; begin n := v[]; return n; end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "f" near line 3 +CONTEXT: compilation of PL/pgSQL function "f" near line 2 set plsql_show_all_error to off; create or replace function f(v int[]) return int as @@ -47,10 +46,9 @@ return n; end; / ERROR: syntax error at or near "]" -LINE 4: n := v[]; +LINE 3: n := v[]; ^ -QUERY: DECLARE -n int; +QUERY: DECLARE n int; begin n := v[]; return n; @@ -77,17 +75,16 @@ return n; end; / NOTICE: syntax error at or near "]" -LINE 4: n := v[]; +LINE 3: n := v[]; ^ -QUERY: DECLARE -n int; +QUERY: DECLARE n int; begin n := v[]; return n; end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "f" near line 3 +CONTEXT: compilation of PL/pgSQL function "f" near line 2 set plsql_show_all_error to off; create or replace function f(v int[]) return int as @@ -106,10 +103,9 @@ return n; end; / ERROR: syntax error at or near "]" -LINE 4: n := v[]; +LINE 3: n := v[]; ^ -QUERY: DECLARE -n int; +QUERY: DECLARE n int; begin n := v[]; return n; diff --git a/src/test/regress/expected/char_truncation_common.out b/src/test/regress/expected/char_truncation_common.out index 4384c94dc5..fe1498c2f8 100644 --- a/src/test/regress/expected/char_truncation_common.out +++ b/src/test/regress/expected/char_truncation_common.out @@ -340,7 +340,7 @@ call pro_insert_trunc(43947123894723895743728943.5425235,'2016-06-30','2013-12-1 ERROR: value too long for type character(6) CONTEXT: referenced column: c_char1 SQL statement "insert into inst_trc_t1_01 values(c_varchar2,c_date,c_timestamp_wztimezone,c_number,substr(c_date,3,6))" -PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 3 at SQL statement +PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 2 at SQL statement set td_compatible_truncation=on; show td_compatible_truncation; td_compatible_truncation @@ -365,7 +365,7 @@ call pro_insert_trunc(43947123894723895743728943.5425235,'2016-06-30','2013-12-1 ERROR: value too long for type character(6) CONTEXT: referenced column: c_char1 SQL statement "insert into inst_trc_t1_01 values(c_varchar2,c_date,c_timestamp_wztimezone,c_number,substr(c_date,3,6))" -PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 3 at SQL statement +PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 2 at SQL statement drop table if exists inst_trc_t1_01; drop procedure if exists pro_insert_trunc; --Prepare stmt test diff --git a/src/test/regress/expected/create_function.out b/src/test/regress/expected/create_function.out index 5da59e33db..ff259b41e2 100644 --- a/src/test/regress/expected/create_function.out +++ b/src/test/regress/expected/create_function.out @@ -46,9 +46,9 @@ END ; / call proc_test(); ERROR: commit/rollback/savepoint is not allowed in a non-volatile function -CONTEXT: PL/pgSQL function proc_commit() line 3 at COMMIT +CONTEXT: PL/pgSQL function proc_commit() line 2 at COMMIT SQL statement "CALL proc_commit()" -PL/pgSQL function proc_test() line 3 at PERFORM +PL/pgSQL function proc_test() line 2 at PERFORM create or replace procedure p1(a out varchar2,b int) is begin a:='aa'||b; @@ -63,5 +63,5 @@ raise info 'var:%',var; end; / INFO: a:aa3 -CONTEXT: PL/pgSQL function inline_code_block line 4 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 3 at assignment INFO: var:aa3 diff --git a/src/test/regress/expected/declare_multiple_variable.out b/src/test/regress/expected/declare_multiple_variable.out index 7c58756cc5..ef46f4ad65 100644 --- a/src/test/regress/expected/declare_multiple_variable.out +++ b/src/test/regress/expected/declare_multiple_variable.out @@ -176,7 +176,7 @@ END; ERROR: refcursor not support declare multiple variable LINE 2: C1,C2 CURSOR_TYPE; ^ -QUERY: DECLARE TYPE CURSOR_TYPE IS REF CURSOR; +QUERY: DECLARE TYPE CURSOR_TYPE IS REF CURSOR; C1,C2 CURSOR_TYPE; BEGIN END @@ -186,9 +186,9 @@ BEGIN END; / ERROR: refcursor not support declare multiple variable -LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR; - ^ -QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR; +LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR; + ^ +QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR; BEGIN END --test declare mutile variabe for alias @@ -201,7 +201,7 @@ END; ERROR: alias not support declare multiple variable LINE 2: DECLARE alias1,alias2 ALIAS FOR old1; ^ -QUERY: DECLARE old1,old2 int; +QUERY: DECLARE old1,old2 int; DECLARE alias1,alias2 ALIAS FOR old1; BEGIN END @@ -234,9 +234,9 @@ BEGIN END; / ERROR: not support declare multiple variable -LINE 1: DECLARE DECLARE res1,res2 int default (3+4); - ^ -QUERY: DECLARE DECLARE res1,res2 int default (3+4); +LINE 1: DECLARE DECLARE res1,res2 int default (3+4); + ^ +QUERY: DECLARE DECLARE res1,res2 int default (3+4); DECLARE str1,str2 text default 'opengunass'; DECLARE num1,num2,num3 number default 23.34; DECLARE mon1,mon2 money default 1000.00; @@ -271,7 +271,7 @@ END; ERROR: not support declare multiple variable LINE 2: C1,C2 CURSOR_TYPE; ^ -QUERY: DECLARE TYPE CURSOR_TYPE IS REF CURSOR; +QUERY: DECLARE TYPE CURSOR_TYPE IS REF CURSOR; C1,C2 CURSOR_TYPE; BEGIN END @@ -281,9 +281,9 @@ BEGIN END; / ERROR: not support declare multiple variable -LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR; - ^ -QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR; +LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR; + ^ +QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR; BEGIN END --test declare mutile variabe for alias @@ -294,9 +294,9 @@ BEGIN END; / ERROR: not support declare multiple variable -LINE 1: DECLARE old1,old2 int; - ^ -QUERY: DECLARE old1,old2 int; +LINE 1: DECLARE old1,old2 int; + ^ +QUERY: DECLARE old1,old2 int; DECLARE alias1,alias2 ALIAS FOR old1; BEGIN END @@ -320,10 +320,9 @@ begin end; / ERROR: not support declare multiple variable -LINE 6: declare va1,va2 t1 default '{1,2}'; +LINE 5: declare va1,va2 t1 default '{1,2}'; ^ -QUERY: DECLARE -type t1 is varray(10) of int; +QUERY: DECLARE type t1 is varray(10) of int; type t2 is table of int; type t3 is table of varchar2(10) index by varchar2(10); type t4 is varray(10) of text; @@ -358,10 +357,9 @@ begin end; / ERROR: not support declare multiple variable -LINE 6: declare va1,va2 t1 default '{1,2}'; +LINE 5: declare va1,va2 t1 default '{1,2}'; ^ -QUERY: DECLARE -type t1 is varray(10) of int; +QUERY: DECLARE type t1 is varray(10) of int; type t2 is table of int; type t3 is table of varchar2(10) index by varchar2(10); type t4 is varray(10) of text; diff --git a/src/test/regress/expected/function.out b/src/test/regress/expected/function.out index baea2149a8..6cd65dd612 100644 --- a/src/test/regress/expected/function.out +++ b/src/test/regress/expected/function.out @@ -1484,9 +1484,9 @@ call sche1.pro(); ERROR: relation "test" already exists in schema "sche1" DETAIL: creating new table with existing name in the same schema CONTEXT: SQL statement "create table test as select * from sche_t1" -PL/pgSQL function sche1.subpro() line 3 at SQL statement +PL/pgSQL function sche1.subpro() line 2 at SQL statement SQL statement "CALL subpro()" -PL/pgSQL function sche1.pro() line 4 at PERFORM +PL/pgSQL function sche1.pro() line 3 at PERFORM drop schema sche1 cascade; NOTICE: drop cascades to 3 other objects DETAIL: drop cascades to table sche1.sche_t1 diff --git a/src/test/regress/expected/hw_cursor_part1.out b/src/test/regress/expected/hw_cursor_part1.out index 32a116707a..3bc8e47a3b 100644 --- a/src/test/regress/expected/hw_cursor_part1.out +++ b/src/test/regress/expected/hw_cursor_part1.out @@ -367,13 +367,13 @@ end; / call proc_test(1,'hello'); NOTICE: dfdf+f -CONTEXT: PL/pgSQL function proc_test(character varying) line 6 at assignment +CONTEXT: PL/pgSQL function proc_test(character varying) line 5 at assignment NOTICE: dfdf+t -CONTEXT: PL/pgSQL function proc_test(character varying) line 8 at assignment +CONTEXT: PL/pgSQL function proc_test(character varying) line 7 at assignment NOTICE: t -CONTEXT: PL/pgSQL function proc_test(character varying) line 8 at assignment +CONTEXT: PL/pgSQL function proc_test(character varying) line 7 at assignment NOTICE: 1,test -CONTEXT: PL/pgSQL function proc_test(character varying) line 8 at assignment +CONTEXT: PL/pgSQL function proc_test(character varying) line 7 at assignment NOTICE: t NOTICE: 0 o_retcode @@ -434,11 +434,11 @@ end; call proc_test(1); NOTICE: v_c row count 0 NOTICE: open is true -CONTEXT: PL/pgSQL function proc_test(numeric) line 15 at assignment +CONTEXT: PL/pgSQL function proc_test(numeric) line 14 at assignment NOTICE: a is open -CONTEXT: PL/pgSQL function proc_test(numeric) line 15 at assignment +CONTEXT: PL/pgSQL function proc_test(numeric) line 14 at assignment NOTICE: fetch is execute -CONTEXT: PL/pgSQL function proc_test(numeric) line 15 at assignment +CONTEXT: PL/pgSQL function proc_test(numeric) line 14 at assignment NOTICE: v_c found is true NOTICE: v_c row count 1 proc_test @@ -656,12 +656,12 @@ select proc_test('1'); NOTICE: a is open CONTEXT: referenced column: func_test SQL statement "SELECT func_test(v_c,i_b)" -PL/pgSQL function proc_test(character varying) line 7 at assignment +PL/pgSQL function proc_test(character varying) line 6 at assignment referenced column: proc_test NOTICE: fetch is execute CONTEXT: referenced column: func_test SQL statement "SELECT func_test(v_c,i_b)" -PL/pgSQL function proc_test(character varying) line 7 at assignment +PL/pgSQL function proc_test(character varying) line 6 at assignment referenced column: proc_test NOTICE: t CONTEXT: referenced column: proc_test @@ -970,11 +970,11 @@ close c; end; / NOTICE: a1:1 -CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 4 at assignment NOTICE: a1:2 -CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 4 at assignment ERROR: cursor " select c1 from tb1;" does not exist in FETCH statement. -CONTEXT: PL/pgSQL function inline_code_block line 7 at FETCH +CONTEXT: PL/pgSQL function inline_code_block line 6 at FETCH create table t1_refcursor(a int); insert into t1_refcursor values (1); insert into t1_refcursor values (2); diff --git a/src/test/regress/expected/hw_cursor_part7.out b/src/test/regress/expected/hw_cursor_part7.out index 0fde5b697f..b8d4c99a21 100644 --- a/src/test/regress/expected/hw_cursor_part7.out +++ b/src/test/regress/expected/hw_cursor_part7.out @@ -925,7 +925,7 @@ end / NOTICE: 1,true,1 CONTEXT: SQL statement "CALL proc_test()" -PL/pgSQL function inline_code_block line 7 at PERFORM +PL/pgSQL function inline_code_block line 6 at PERFORM NOTICE: 1,true,1 drop table tb_test; drop schema hw_cursor_part7 CASCADE; diff --git a/src/test/regress/expected/hw_cursor_part8.out b/src/test/regress/expected/hw_cursor_part8.out index f4562f298a..5948d6361b 100644 --- a/src/test/regress/expected/hw_cursor_part8.out +++ b/src/test/regress/expected/hw_cursor_part8.out @@ -424,7 +424,7 @@ NOTICE: test cursor close pro_cursor_c0019_1; select * from pro_cursor_c0019(); ERROR: cannot open FETCH query as cursor -CONTEXT: PL/pgSQL function pro_cursor_c0019() line 5 at OPEN +CONTEXT: PL/pgSQL function pro_cursor_c0019() line 4 at OPEN create table test_cursor_table(c1 int,c2 varchar); insert into test_cursor_table values(1,'Jack'),(2,'Rose'); create or replace procedure test_cursor_8() as diff --git a/src/test/regress/expected/hw_cursor_rollback.out b/src/test/regress/expected/hw_cursor_rollback.out index fba116208e..90d8c7221a 100644 --- a/src/test/regress/expected/hw_cursor_rollback.out +++ b/src/test/regress/expected/hw_cursor_rollback.out @@ -41,10 +41,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 2 indexscan set enable_seqscan = 0; set enable_indexscan = 1; @@ -85,10 +85,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 3 indexonlyscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -128,10 +128,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 4 bitmapscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -173,10 +173,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 5 tidscan drop table pl_txn_t; create table pl_txn_t(tc1 int,b number(3)); @@ -219,16 +219,16 @@ end savepck; call savepck.save2(); NOTICE: ----(0,1) CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: ----1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6 Multiple tables: Open after insert,rollback --case 6-1 seqscan drop table pl_txn_t; @@ -281,10 +281,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-2 indexscan set enable_seqscan = 0; set enable_indexscan = 1; @@ -326,10 +326,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-3 indexonlyscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -371,10 +371,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-4 bitmapscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -418,10 +418,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-5 tidscan drop table pl_txn_t; drop table pl_txn_t2; @@ -474,16 +474,16 @@ end savepck; call savepck.save2(); NOTICE: ----(0,1) CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: ----1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH drop schema hw_cursor_rollback CASCADE; NOTICE: drop cascades to 5 other objects --?DETAIL: drop cascades to package .* diff --git a/src/test/regress/expected/hw_cursor_rollback_ustore.out b/src/test/regress/expected/hw_cursor_rollback_ustore.out index 9c9ce2c59c..598463ef02 100644 --- a/src/test/regress/expected/hw_cursor_rollback_ustore.out +++ b/src/test/regress/expected/hw_cursor_rollback_ustore.out @@ -41,10 +41,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 2 indexscan set enable_seqscan = 0; set enable_indexscan = 1; @@ -85,10 +85,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 3 indexonlyscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -128,10 +128,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 4 bitmapscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -173,10 +173,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 5 tidscan drop table pl_txn_t; create table pl_txn_t(tc1 int,b number(3)) with (STORAGE_TYPE = USTORE); @@ -219,16 +219,16 @@ end savepck; call savepck.save2(); NOTICE: ----(0,1) CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: ----1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6 Multiple tables: Open after insert,rollback --case 6-1 seqscan drop table pl_txn_t; @@ -281,10 +281,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-2 indexscan set enable_seqscan = 0; set enable_indexscan = 1; @@ -326,10 +326,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-3 indexonlyscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -371,10 +371,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-4 bitmapscan set enable_seqscan = 0; set enable_indexscan = 0; @@ -418,10 +418,10 @@ end savepck; call savepck.save2(); NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH --case 6-5 tidscan drop table pl_txn_t; drop table pl_txn_t2; @@ -474,16 +474,16 @@ end savepck; call savepck.save2(); NOTICE: ----(0,1) CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: ----1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 1 CONTEXT: SQL statement "CALL savepointtest(c1)" -PL/pgSQL function save2() line 5 at SQL statement +PL/pgSQL function save2() line 4 at SQL statement NOTICE: 2 ERROR: The data has been rollback, and the cursor data cannot be obtained. -CONTEXT: PL/pgSQL function save2() line 7 at FETCH +CONTEXT: PL/pgSQL function save2() line 6 at FETCH drop schema hw_cursor_rollback_ustore CASCADE; NOTICE: drop cascades to 5 other objects --?DETAIL: drop cascades to package .* diff --git a/src/test/regress/expected/hw_explain_pretty1.out b/src/test/regress/expected/hw_explain_pretty1.out index 85f24cc9d9..9fbee636e1 100644 --- a/src/test/regress/expected/hw_explain_pretty1.out +++ b/src/test/regress/expected/hw_explain_pretty1.out @@ -30,7 +30,7 @@ end; / call test_explain_param(123); ERROR: query has no destination for result data -CONTEXT: PL/pgSQL function test_explain_param(integer) line 3 at SQL statement +CONTEXT: PL/pgSQL function test_explain_param(integer) line 2 at SQL statement ---- --- test 1: Insert with nonzero rows ---- diff --git a/src/test/regress/expected/hw_func_return_out.out b/src/test/regress/expected/hw_func_return_out.out index c9cc0718f6..a82eaf66a2 100644 --- a/src/test/regress/expected/hw_func_return_out.out +++ b/src/test/regress/expected/hw_func_return_out.out @@ -137,7 +137,7 @@ begin end; / ERROR: invalid input syntax for integer: "abc" -CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement declare a int := 1; b int; @@ -156,7 +156,7 @@ AS ERROR: RETURN cannot have a parameter in function returning void LINE 2: RETURN i; ^ -QUERY: DECLARE BEGIN +QUERY: DECLARE BEGIN RETURN i; END --ora err @@ -287,7 +287,7 @@ AS ERROR: RETURN must specify a record or row variable in function returning row LINE 3: RETURN result; ^ -QUERY: DECLARE result int; +QUERY: DECLARE result int; BEGIN RETURN result; END @@ -310,7 +310,7 @@ AS ERROR: RETURN must specify a record or row variable in function returning row LINE 3: RETURN 1; ^ -QUERY: DECLARE result int; +QUERY: DECLARE result int; BEGIN RETURN 1; END @@ -511,7 +511,7 @@ LINE 1: SELECT 2 * test_return(a, b) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. QUERY: SELECT 2 * test_return(a, b) -CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment declare a int := 1; b int := 1; @@ -533,7 +533,7 @@ LINE 1: SELECT test_return(a)+ test_return(a, b) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. QUERY: SELECT test_return(a)+ test_return(a, b) -CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment DROP FUNCTION test_return; declare temp varchar2(20); @@ -734,7 +734,7 @@ begin end; / ERROR: invalid input syntax for integer: "abc" -CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement declare a int := 1; b int; @@ -753,7 +753,7 @@ AS ERROR: RETURN cannot have a parameter in function returning void LINE 2: RETURN i; ^ -QUERY: DECLARE BEGIN +QUERY: DECLARE BEGIN RETURN i; END --ora err @@ -884,7 +884,7 @@ AS ERROR: RETURN must specify a record or row variable in function returning row LINE 3: RETURN result; ^ -QUERY: DECLARE result int; +QUERY: DECLARE result int; BEGIN RETURN result; END @@ -907,7 +907,7 @@ AS ERROR: RETURN must specify a record or row variable in function returning row LINE 3: RETURN 1; ^ -QUERY: DECLARE result int; +QUERY: DECLARE result int; BEGIN RETURN 1; END @@ -1107,7 +1107,7 @@ LINE 1: SELECT 2 * test_return(a, b) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. QUERY: SELECT 2 * test_return(a, b) -CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment declare a int := 1; b int := 1; @@ -1129,7 +1129,7 @@ LINE 1: SELECT test_return(a)+ test_return(a, b) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. QUERY: SELECT test_return(a)+ test_return(a, b) -CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment +CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment DROP FUNCTION test_return; declare temp varchar2(20); diff --git a/src/test/regress/expected/hw_grant_package.out b/src/test/regress/expected/hw_grant_package.out index f4e31b116e..8e9b3f19ca 100644 --- a/src/test/regress/expected/hw_grant_package.out +++ b/src/test/regress/expected/hw_grant_package.out @@ -67,13 +67,13 @@ SET SESSION AUTHORIZATION test_grant2 password 'Gauss123'; call test_grant1.pck3.p1(); INFO: va:(1,zhangsan,shanghai) CONTEXT: SQL statement "CALL p2(b,va,1,vb)" -PL/pgSQL function p1() line 9 at PERFORM +PL/pgSQL function p1() line 8 at PERFORM INFO: vb(233):(10087,aa,bb) CONTEXT: SQL statement "CALL p2(b,va,1,vb)" -PL/pgSQL function p1() line 9 at PERFORM +PL/pgSQL function p1() line 8 at PERFORM INFO: vb:{"(10086,aa,bb)","(10087,aa,bb)"} CONTEXT: SQL statement "CALL p2(b,va,1,vb)" -PL/pgSQL function p1() line 9 at PERFORM +PL/pgSQL function p1() line 8 at PERFORM p1 ---- diff --git a/src/test/regress/expected/hw_package.out b/src/test/regress/expected/hw_package.out index 84b8b6f652..582b544db4 100644 --- a/src/test/regress/expected/hw_package.out +++ b/src/test/regress/expected/hw_package.out @@ -323,8 +323,7 @@ drop cascades to function public.autonomous_f_150_1_private(integer) CREATE OR REPLACE FUNCTION public.feature_cross_test.func3(a int --函数入参注释 end ) RETURN numeric NOT FENCED NOT SHIPPABLE PACKAGE -AS DECLARE ---函数头部注释 +AS DECLARE --函数头部注释 begin data1 := 1; data2 := 2; @@ -387,10 +386,9 @@ END; END autonomous_pkg_150; / ERROR: mismatched parentheses at or near ")" -LINE 7: select count(*)) into re_int from test_package1; +LINE 6: select count(*)) into re_int from test_package1; ^ -QUERY: DECLARE -PRAGMA AUTONOMOUS_TRANSACTION; +QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION; re_int INT; BEGIN re_int:=autonomous_1; @@ -520,7 +518,7 @@ ERROR: package instantiation can not have autonomous function DETAIL: this package have autonmous function CONTEXT: referenced column: autonomous_f_150_1 SQL statement "SELECT autonomous_f_150_1(autonomous_f_150_1_private(1))" -PL/pgSQL function inline_code_block line 3 at PERFORM +PL/pgSQL function inline_code_block line 2 at PERFORM compilation of PL/pgSQL package near line 0 create or replace package pack_log is @@ -649,7 +647,7 @@ select multi_sql.func16(); ERROR: alter function in package is not allowed DETAIL: please rebuild package CONTEXT: SQL statement "alter function func5() rename to func25" -PL/pgSQL function func16() line 3 at SQL statement +PL/pgSQL function func16() line 2 at SQL statement referenced column: func16 create or replace package aa is @@ -748,7 +746,7 @@ call multi_sql.func16(); ERROR: alter function in package is not allowed DETAIL: please rebuild package CONTEXT: SQL statement "alter function func5() rename to func25" -PL/pgSQL function func16() line 3 at SQL statement +PL/pgSQL function func16() line 2 at SQL statement create or replace package pkgschema1.aa is a int:=1; @@ -841,10 +839,9 @@ end; end test1; / ERROR: "test1.a" is not a known variable -LINE 5: test1.a:=case when 1>2 then 1 else 1 end; +LINE 4: test1.a:=case when 1>2 then 1 else 1 end; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin for rec in (select 1) loop begin test1.a:=case when 1>2 then 1 else 1 end; @@ -1058,10 +1055,9 @@ end; end pckg_test; / ERROR: type "tb_test" does not exist -LINE 2: v_t tb_test; - ^ -QUERY: DECLARE -v_t tb_test; +LINE 1: DECLARE v_t tb_test; + ^ +QUERY: DECLARE v_t tb_test; o_list sys_refcursor; begin for rec in (select col1,col2 from tb_test where col1pkg059.col1,cf2=>pkg059.col2)" --?.* SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: col4 is {"(2,2,varchar10,clob2clob2,0ABCDEF2)","(1,1,varchar1,clob1clob1,0ABCDEF1)"} CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" -PL/pgSQL function func059_2(integer) line 7 at PERFORM +PL/pgSQL function func059_2(integer) line 6 at PERFORM SQL statement "CALL pkg059.func059_2(cf3)" --?.* SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" --?.* SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cf2(1).c1 is CONTEXT: SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" --?.* SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cp1 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"} CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cp2 is CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cp3 is CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: de2 out is create or replace package body pkg059 is @@ -2053,42 +2047,42 @@ INFO: de1 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0 INFO: de2 is {"(201,201,varchar1200,clob1clob1200,00ABCDEF1200)","(202,202,varchar10200,clob2clob2200,00ABCDEF2200)"} INFO: pkg059.col1 {} CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: pkg059.col2 {} CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: col3 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"} CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" -PL/pgSQL function func059_2(integer) line 7 at PERFORM +PL/pgSQL function func059_2(integer) line 6 at PERFORM SQL statement "CALL pkg059.func059_2(cf3)" --?.* SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" --?.* SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: col4 is {"(2,2,varchar10,clob2clob2,0ABCDEF2)","(1,1,varchar1,clob1clob1,0ABCDEF1)"} CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" -PL/pgSQL function func059_2(integer) line 7 at PERFORM +PL/pgSQL function func059_2(integer) line 6 at PERFORM SQL statement "CALL pkg059.func059_2(cf3)" --?.* SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" --?.* SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cf2(1).c1 is CONTEXT: SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" --?.* SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cp1 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"} CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cp2 is CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: cp3 is CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" -PL/pgSQL function inline_code_block line 13 at SQL statement +PL/pgSQL function inline_code_block line 12 at SQL statement INFO: de2 out is --test alter package owner create user alt_package PASSWORD 'gauss@123'; @@ -2372,24 +2366,21 @@ call pck1.func2(); \sf p1 CREATE OR REPLACE PROCEDURE pkgsch059.p1() AUTHID CURRENT_USER -AS DECLARE -begin +AS DECLARE begin null; end; / \sf p2 CREATE OR REPLACE PROCEDURE pkgsch059.p2() AUTHID DEFINER -AS DECLARE -begin +AS DECLARE begin null; end; / \sf p3 CREATE OR REPLACE PROCEDURE pkgsch059.p3() AUTHID DEFINER -AS DECLARE -begin +AS DECLARE begin null; end; / diff --git a/src/test/regress/expected/hw_package_function.out b/src/test/regress/expected/hw_package_function.out index 8b1d07d858..69b5433d13 100644 --- a/src/test/regress/expected/hw_package_function.out +++ b/src/test/regress/expected/hw_package_function.out @@ -691,7 +691,7 @@ begin end; / ERROR: argument name "j" used more than once -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 4 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 3 declare a int := 1; b int := 1; @@ -701,7 +701,7 @@ begin end; / ERROR: Named argument "j" can not be a const -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 6 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 5 create or replace function test_para2(col in text, col2 out int) returns text package as $$ declare @@ -890,7 +890,7 @@ end pkg2; call pkg2.f1(5); INFO: the number is 5. CONTEXT: SQL statement "CALL syn1.p1(p)" -PL/pgSQL function f1(integer) line 3 at PERFORM +PL/pgSQL function f1(integer) line 2 at PERFORM f1 ---- diff --git a/src/test/regress/expected/hw_package_variable.out b/src/test/regress/expected/hw_package_variable.out index c38f1b258c..4671a5d410 100644 --- a/src/test/regress/expected/hw_package_variable.out +++ b/src/test/regress/expected/hw_package_variable.out @@ -453,10 +453,9 @@ pck1.va := vb; end; / ERROR: "va" is declared CONSTANT -LINE 5: pck1.va := vb; +LINE 4: pck1.va := vb; ^ -QUERY: DECLARE -vb int; +QUERY: DECLARE vb int; begin vb := 2; pck1.va := vb; @@ -475,10 +474,9 @@ pck1.vb := vb; end; / ERROR: "pck1.vb" is not a known variable -LINE 5: pck1.vb := vb; +LINE 4: pck1.vb := vb; ^ -QUERY: DECLARE -vb int; +QUERY: DECLARE vb int; begin vb := 2; pck1.vb := vb; @@ -491,10 +489,9 @@ pck2.vb := vb; end; / ERROR: "pck2.vb" is not a known variable -LINE 5: pck2.vb := vb; +LINE 4: pck2.vb := vb; ^ -QUERY: DECLARE -vb int; +QUERY: DECLARE vb int; begin vb := 2; pck2.vb := vb; @@ -1031,7 +1028,7 @@ end pck1; ERROR: duplicate declaration at or near "va" LINE 10: va int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1064,7 +1061,7 @@ end pck1; ERROR: duplicate declaration at or near "vb" LINE 10: vb int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1097,7 +1094,7 @@ end pck1; ERROR: duplicate declaration at or near "r1" LINE 10: r1 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1130,7 +1127,7 @@ end pck1; ERROR: duplicate declaration at or near "r2" LINE 10: r2 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1163,7 +1160,7 @@ end pck1; ERROR: duplicate declaration at or near "r4" LINE 10: r4 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1199,7 +1196,7 @@ end; ERROR: duplicate declaration at or near "va" LINE 10: va int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1230,7 +1227,7 @@ end; ERROR: duplicate declaration at or near "vb" LINE 10: vb int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1262,7 +1259,7 @@ end; ERROR: duplicate declaration at or near "vd" LINE 11: vd int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1294,7 +1291,7 @@ end; ERROR: duplicate declaration at or near "ve" LINE 10: ve int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1325,7 +1322,7 @@ end; ERROR: duplicate declaration at or near "r1" LINE 10: r1 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1356,7 +1353,7 @@ end; ERROR: duplicate declaration at or near "r2" LINE 10: r2 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1387,7 +1384,7 @@ end; ERROR: duplicate declaration at or near "r3" LINE 10: r3 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1418,7 +1415,7 @@ end; ERROR: duplicate declaration at or near "r4" LINE 10: r4 int; ^ -QUERY: DECLARE type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); type r2 is varray(10) of int; type r3 is table of int; type r4 is ref cursor; @@ -1463,7 +1460,7 @@ end pck1; ERROR: duplicate declaration at or near "r1" LINE 2: r1 int; ^ -QUERY: DECLARE va r1; +QUERY: DECLARE va r1; r1 int; begin NULL; @@ -1480,7 +1477,7 @@ end pck1; ERROR: duplicate declaration at or near "r1" LINE 2: type r1 is record (a int, b int); ^ -QUERY: DECLARE va r1; +QUERY: DECLARE va r1; type r1 is record (a int, b int); begin NULL; @@ -1497,7 +1494,7 @@ end pck1; ERROR: duplicate declaration at or near "r2" LINE 2: r2 int; ^ -QUERY: DECLARE va r2; +QUERY: DECLARE va r2; r2 int; begin NULL; @@ -1514,7 +1511,7 @@ end pck1; ERROR: duplicate declaration at or near "r3" LINE 2: r3 int; ^ -QUERY: DECLARE va r3; +QUERY: DECLARE va r3; r3 int; begin NULL; @@ -1531,7 +1528,7 @@ end pck1; ERROR: duplicate declaration at or near "r4" LINE 2: r4 int; ^ -QUERY: DECLARE va r4; +QUERY: DECLARE va r4; r4 int; begin NULL; @@ -1558,10 +1555,9 @@ end; end pck1; / ERROR: duplicate declaration at or near "va" -LINE 3: va int; +LINE 2: va int; ^ -QUERY: DECLARE -vd int := va; +QUERY: DECLARE vd int := va; va int; begin end @@ -1574,10 +1570,9 @@ end; end pck1; / ERROR: duplicate declaration at or near "vb" -LINE 3: vb int; +LINE 2: vb int; ^ -QUERY: DECLARE -vd r2 := vb; +QUERY: DECLARE vd r2 := vb; vb int; begin end @@ -1590,10 +1585,9 @@ end; end pck1; / ERROR: duplicate declaration at or near "vc" -LINE 3: vc int; +LINE 2: vc int; ^ -QUERY: DECLARE -vd int := vc; +QUERY: DECLARE vd int := vc; vc int; begin end @@ -1656,10 +1650,9 @@ null; end; / ERROR: duplicate declaration at or near "r1" -LINE 3: r1 r1; +LINE 2: r1 r1; ^ -QUERY: DECLARE -type r1 is record (a int, b int); +QUERY: DECLARE type r1 is record (a int, b int); r1 r1; begin null; @@ -1672,10 +1665,9 @@ null; end; / ERROR: duplicate declaration at or near "r1" -LINE 3: r1 r1; +LINE 2: r1 r1; ^ -QUERY: DECLARE -type r1 is varray(10) of int; +QUERY: DECLARE type r1 is varray(10) of int; r1 r1; begin null; @@ -1688,10 +1680,9 @@ null; end; / ERROR: duplicate declaration at or near "r1" -LINE 3: r1 r1; +LINE 2: r1 r1; ^ -QUERY: DECLARE -type r1 is table of int; +QUERY: DECLARE type r1 is table of int; r1 r1; begin null; @@ -1755,7 +1746,7 @@ end pck2; call pck2.p1(); INFO: 11 CONTEXT: SQL statement "CALL p2(11)" -PL/pgSQL function p1() line 3 at PERFORM +PL/pgSQL function p1() line 2 at PERFORM p1 ---- @@ -1917,7 +1908,7 @@ end pck1; / ERROR: compile failed when parse the query: (select a,b into v1 from tab1) DETAIL: select into clause is not supported in cursor or for..in loop condition yet. -CONTEXT: compilation of PL/pgSQL package near line 4 +CONTEXT: compilation of PL/pgSQL package near line 3 create or replace package pck1 as func int; function func() return int; @@ -2465,7 +2456,7 @@ end; end pck2; / ERROR: pck1.c1 isn't a cursor -CONTEXT: compilation of PL/pgSQL package near line 6 +CONTEXT: compilation of PL/pgSQL package near line 5 create or replace package body pck2 is procedure p1 as type r1 is record (a int, b int); @@ -2479,7 +2470,7 @@ end; end pck2; / ERROR: undefined cursor: pck1.c2 -CONTEXT: compilation of PL/pgSQL package near line 6 +CONTEXT: compilation of PL/pgSQL package near line 5 DROP PACKAGE pck2; NOTICE: drop cascades to function pkg_val_2.p1() DROP PACKAGE pck1; @@ -2664,10 +2655,9 @@ end; end pck1; / ERROR: cursor referenced by "pkg_val_2.pck1.c1" is not supported yet -LINE 4: open pkg_val_2.pck1.c1; +LINE 3: open pkg_val_2.pck1.c1; ^ -QUERY: DECLARE -va t1; +QUERY: DECLARE va t1; begin open pkg_val_2.pck1.c1; close pkg_val_2.pck1.c1; @@ -2697,10 +2687,9 @@ end; end pck1; / ERROR: cursor referenced by "pck2.c1" in autonomous procedure is not supported yet -LINE 5: open pck2.c1; +LINE 4: open pck2.c1; ^ -QUERY: DECLARE -PRAGMA AUTONOMOUS_TRANSACTION; +QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION; va t1; begin open pck2.c1; @@ -2718,10 +2707,9 @@ end; end pck1; / ERROR: cursor referenced by "c1" in autonomous procedure is not supported yet -LINE 5: open c1; +LINE 4: open c1; ^ -QUERY: DECLARE -PRAGMA AUTONOMOUS_TRANSACTION; +QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION; va t1; begin open c1; @@ -2800,9 +2788,9 @@ end pck1; call pck1.p1(); ERROR: ERROR: package cursor referenced in autonomous procedure is not supported yet DETAIL: cursor "c1" in package "pck2" referenced in autonomous procedure is not supported yet -CONTEXT: PL/pgSQL function p2() line 4 at OPEN +CONTEXT: PL/pgSQL function p2() line 3 at OPEN SQL statement "CALL p2()" -PL/pgSQL function p1() line 4 at PERFORM +PL/pgSQL function p1() line 3 at PERFORM referenced column: p1 DROP PACKAGE pck1; @@ -2837,7 +2825,7 @@ end; / ERROR: compile failed when parse the query: select c3 from check_tab1 order by c3 limit 6 DETAIL: relation "check_tab1" does not exist on datanode1 -CONTEXT: compilation of PL/pgSQL function "check_f04" near line 11 +CONTEXT: compilation of PL/pgSQL function "check_f04" near line 10 create table check_tab1(a int); create or replace function check_f04 return int as declare @@ -2864,7 +2852,7 @@ end; / ERROR: compile failed when parse the query: select c3 from check_tab1 order by c3 limit 6 DETAIL: column "c3" does not exist -CONTEXT: compilation of PL/pgSQL function "check_f04" near line 11 +CONTEXT: compilation of PL/pgSQL function "check_f04" near line 10 drop table check_tab1; reset behavior_compat_options; -- ref package cursor attr at first @@ -2974,13 +2962,13 @@ INFO: isopend: t INFO: rowcount: 1 INFO: va:(3,4) CONTEXT: SQL statement "CALL pp1()" -PL/pgSQL function p1() line 12 at PERFORM +PL/pgSQL function p1() line 11 at PERFORM INFO: isopend: t CONTEXT: SQL statement "CALL pp1()" -PL/pgSQL function p1() line 12 at PERFORM +PL/pgSQL function p1() line 11 at PERFORM INFO: rowcount: 2 CONTEXT: SQL statement "CALL pp1()" -PL/pgSQL function p1() line 12 at PERFORM +PL/pgSQL function p1() line 11 at PERFORM p1 ---- @@ -2994,11 +2982,10 @@ fetch pck1.c1 into va; end; / ERROR: package cursor with arguments is only supported to be opened in the same package. -LINE 4: open pck1.c1(4); +LINE 3: open pck1.c1(4); ^ DETAIL: cursor "pck1.c1" is only supported to be opened in the package "pck1" -QUERY: DECLARE -va t1; +QUERY: DECLARE va t1; begin open pck1.c1(4); fetch pck1.c1 into va; @@ -3057,10 +3044,10 @@ end; / INFO: before auto: hahahah,(1,cccc) CONTEXT: SQL statement "CALL p1(150,pck1.va,pck1.vc)" -PL/pgSQL function inline_code_block line 4 at PERFORM +PL/pgSQL function inline_code_block line 3 at PERFORM INFO: after auto: hahahah,(1,cccc) CONTEXT: SQL statement "CALL p1(150,pck1.va,pck1.vc)" -PL/pgSQL function inline_code_block line 4 at PERFORM +PL/pgSQL function inline_code_block line 3 at PERFORM INFO: after p1: bbbbbbb,(123,ayayayayay) drop procedure p1; diff --git a/src/test/regress/expected/hw_pct_type_and_rowtype.out b/src/test/regress/expected/hw_pct_type_and_rowtype.out index c9821d2f1e..202d23cdd5 100644 --- a/src/test/regress/expected/hw_pct_type_and_rowtype.out +++ b/src/test/regress/expected/hw_pct_type_and_rowtype.out @@ -376,7 +376,7 @@ end; ERROR: invalid type name "va.c%TYPE" LINE 3: vc va.c%TYPE; ^ -QUERY: DECLARE va foo%ROWTYPE; +QUERY: DECLARE va foo%ROWTYPE; vb va.b%TYPE; vc va.c%TYPE; begin @@ -580,10 +580,10 @@ end pckg_test; call synonym_user_2.pckg_test.proc_test1(); INFO: test procedure CONTEXT: SQL statement "CALL proc_test()" -PL/pgSQL function proc_test1() line 3 at PERFORM +PL/pgSQL function proc_test1() line 2 at PERFORM INFO: test package procedure CONTEXT: SQL statement "CALL pckg_test1.proc_test2()" -PL/pgSQL function proc_test1() line 4 at PERFORM +PL/pgSQL function proc_test1() line 3 at PERFORM proc_test1 ------------ @@ -851,7 +851,7 @@ raise info '%',vb; end; / ERROR: relation "va" does not exist when parse word. -CONTEXT: compilation of PL/pgSQL function "p1" near line 4 +CONTEXT: compilation of PL/pgSQL function "p1" near line 3 -- (2) in package create or replace package pck1 is va test1%ROWTYPE; diff --git a/src/test/regress/expected/hw_procedure_define.out b/src/test/regress/expected/hw_procedure_define.out index 70c9fd6b8d..ed4bb7060f 100644 --- a/src/test/regress/expected/hw_procedure_define.out +++ b/src/test/regress/expected/hw_procedure_define.out @@ -23,7 +23,7 @@ ERROR: missing "DML" at end of SQL expression LINE 3: CREATE ROLE jonathan PASSWORD '********' LOGIN; ^ QUERY: DECLARE -BEGIN forall i in 1..iter +BEGIN forall i in 1..iter CREATE ROLE jonathan PASSWORD '********' LOGIN; end CREATE PROCEDURE test_proc_define @@ -811,5 +811,107 @@ drop procedure p_definer; drop procedure p_caller; drop table test_emp_001; drop procedure test_proc_using_001; +create or replace procedure test_bt_b is +a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; + prosrc +----------------- + DECLARE a int;+ + begin + + a := 'abc'; + + end +(1 row) + +select test_bt_b(); +ERROR: invalid input syntax for integer: "abc" +CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment +referenced column: test_bt_b +create or replace procedure test_bt_b is + a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; + prosrc +----------------- + DECLARE a int;+ + begin + + a := 'abc'; + + end +(1 row) + +select test_bt_b(); +ERROR: invalid input syntax for integer: "abc" +CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment +referenced column: test_bt_b +create or replace procedure test_bt_b is +declare a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; + prosrc +---------------- + declare a int;+ + begin + + a := 'abc'; + + end +(1 row) + +select test_bt_b(); +ERROR: invalid input syntax for integer: "abc" +CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment +referenced column: test_bt_b +create or replace procedure test_bt_b is + declare a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; + prosrc +---------------- + declare a int;+ + begin + + a := 'abc'; + + end +(1 row) + +select test_bt_b(); +ERROR: invalid input syntax for integer: "abc" +CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment +referenced column: test_bt_b +create or +replace +procedure +test_bt_b +is + + + a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; + prosrc +----------------- + DECLARE a int;+ + begin + + a := 'abc'; + + end +(1 row) + +select test_bt_b(); +ERROR: invalid input syntax for integer: "abc" +CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment +referenced column: test_bt_b +drop procedure test_bt_b; \c regression; drop database IF EXISTS pl_test_pkg_define; diff --git a/src/test/regress/expected/mysql_condition.out b/src/test/regress/expected/mysql_condition.out index fc6efa0f50..fcb6e804ae 100644 --- a/src/test/regress/expected/mysql_condition.out +++ b/src/test/regress/expected/mysql_condition.out @@ -19,7 +19,7 @@ end; ERROR: syntax error at or near "exit" LINE 3: declare exit handler for 22012 ^ -QUERY: DECLARE a int; +QUERY: DECLARE a int; begin declare exit handler for 22012 begin @@ -113,7 +113,7 @@ end; WARNING: Please carefully use independent user as it need more self-management. HINT: Self-management include logical backup, password manage and so on. CONTEXT: SQL statement "CREATE USER pri_user_independent WITH INDEPENDENT IDENTIFIED BY "********"" -PL/pgSQL function inline_code_block line 7 at SQL statement +PL/pgSQL function inline_code_block line 6 at SQL statement declare begin declare exit handler for "sqlwarning" @@ -414,17 +414,17 @@ NOTICE: SQLSTATE = 22012 INFO: zero error CONTEXT: referenced column: proc1 SQL statement "SELECT proc1(SQLSTATE)" -PL/pgSQL function proc3(integer,integer) line 6 at PERFORM +PL/pgSQL function proc3(integer,integer) line 5 at PERFORM INFO: b1 is zero NOTICE: SQLSTATE = 0A000 INFO: emmm.... CONTEXT: referenced column: proc1 SQL statement "SELECT proc1(SQLSTATE)" -PL/pgSQL function proc3(integer,integer) line 6 at PERFORM +PL/pgSQL function proc3(integer,integer) line 5 at PERFORM INFO: result: 0 CONTEXT: referenced column: proc2 SQL statement "SELECT proc2(b1, a1)" -PL/pgSQL function proc3(integer,integer) line 12 at PERFORM +PL/pgSQL function proc3(integer,integer) line 11 at PERFORM INFO: END proc3 ------- @@ -436,21 +436,21 @@ NOTICE: SQLSTATE = 22012 INFO: zero error CONTEXT: referenced column: proc1 SQL statement "SELECT proc1(SQLSTATE)" -PL/pgSQL function proc3(integer,integer) line 6 at PERFORM +PL/pgSQL function proc3(integer,integer) line 5 at PERFORM INFO: b1 is zero NOTICE: SQLSTATE = 0A000 INFO: emmm.... CONTEXT: referenced column: proc1 SQL statement "SELECT proc1(SQLSTATE)" -PL/pgSQL function proc3(integer,integer) line 6 at PERFORM +PL/pgSQL function proc3(integer,integer) line 5 at PERFORM NOTICE: SQLSTATE = 22012 CONTEXT: referenced column: proc2 SQL statement "SELECT proc2(b1, a1)" -PL/pgSQL function proc3(integer,integer) line 12 at PERFORM +PL/pgSQL function proc3(integer,integer) line 11 at PERFORM INFO: result: 0 CONTEXT: referenced column: proc2 SQL statement "SELECT proc2(b1, a1)" -PL/pgSQL function proc3(integer,integer) line 12 at PERFORM +PL/pgSQL function proc3(integer,integer) line 11 at PERFORM INFO: END proc3 ------- diff --git a/src/test/regress/expected/mysql_syntax.out b/src/test/regress/expected/mysql_syntax.out index 69c508be27..ef4d9d1f23 100644 --- a/src/test/regress/expected/mysql_syntax.out +++ b/src/test/regress/expected/mysql_syntax.out @@ -275,7 +275,7 @@ end; ERROR: duplicate declaration at or near "c1_all" LINE 8: declare c1_all cursor is --cursor without args ^ -QUERY: DECLARE company_name varchar(100); +QUERY: DECLARE company_name varchar(100); company_loc varchar(100); company_no integer; @@ -400,10 +400,9 @@ exception END; / ERROR: duplicate declaration at or near "DIVISION_ZERO" -LINE 6: declare DIVISION_ZERO condition for SQLSTATE '22005'; +LINE 5: declare DIVISION_ZERO condition for SQLSTATE '22005'; ^ -QUERY: -declare +QUERY: declare a int; BEGIN declare DIVISION_ZERO condition for SQLSTATE '22012'; @@ -437,7 +436,7 @@ BEGIN END; / ERROR: Incorrect CONDITION value: '0' -CONTEXT: compilation of PL/pgSQL function "test_condition_5" near line 3 +CONTEXT: compilation of PL/pgSQL function "test_condition_5" near line 2 -- declare condition sqlstate begin with '00' create or replace procedure test_condition_6 as BEGIN @@ -446,7 +445,7 @@ BEGIN END; / ERROR: bad SQLSTATE '00000' -CONTEXT: compilation of PL/pgSQL function "test_condition_6" near line 3 +CONTEXT: compilation of PL/pgSQL function "test_condition_6" near line 2 create or replace procedure test_condition_1 as declare a int; @@ -508,10 +507,9 @@ exception END; / ERROR: syntax error at or near "SQLSTATE" -LINE 5: declare DIVISION_ZERO condition for SQLSTATE '22012'; +LINE 4: declare DIVISION_ZERO condition for SQLSTATE '22012'; ^ -QUERY: -declare +QUERY: declare a int; BEGIN declare DIVISION_ZERO condition for SQLSTATE '22012'; diff --git a/src/test/regress/expected/out_param_func.out b/src/test/regress/expected/out_param_func.out index 3cb67a89da..282e6ace02 100644 --- a/src/test/regress/expected/out_param_func.out +++ b/src/test/regress/expected/out_param_func.out @@ -1166,7 +1166,7 @@ raise info 'res is:%',res; end; / ERROR: when invoking function f1, no destination for argments "" -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1 drop function f1; create or replace package pck1 is type tp1 is record(v01 number, v03 varchar2, v02 number); diff --git a/src/test/regress/expected/pl_debugger_client.out b/src/test/regress/expected/pl_debugger_client.out index ec849ff200..ff334e80d4 100755 --- a/src/test/regress/expected/pl_debugger_client.out +++ b/src/test/regress/expected/pl_debugger_client.out @@ -420,25 +420,25 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; --?.* --?.* ---? (.*,test_debug2,3," insert into tb1 values (1000);") +--? (.*,test_debug2,2," insert into tb1 values (1000);") (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+------------- - test_debug2 | 4 | commit; + test_debug2 | 3 | commit; (1 row) select funcname, lineno, query from dbe_pldebugger.step(); funcname | lineno | query -------------+--------+------------------------------------ - test_debug2 | 5 | insert into tb1 values (2000); + test_debug2 | 4 | insert into tb1 values (2000); (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+--------------- - test_debug2 | 6 | rollback; + test_debug2 | 5 | rollback; (1 row) select funcname, lineno, query from dbe_pldebugger.next(); @@ -457,13 +457,13 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; --?.* --?.* ---? (.*,test_debug3,5," CASE a") +--? (.*,test_debug3,4," CASE a") (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+----------------------- - test_debug3 | 7 | b := 111; + test_debug3 | 6 | b := 111; (1 row) select * from dbe_pldebugger.info_locals(); @@ -476,19 +476,19 @@ select * from dbe_pldebugger.info_locals(); select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+-------------------------------------------- - test_debug3 | 11 | raise info 'pi_return : %',pi_return ; + test_debug3 | 10 | raise info 'pi_return : %',pi_return ; (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+------------------- - test_debug3 | 14 | b := 101; + test_debug3 | 13 | b := 101; (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+--------------- - test_debug3 | 15 | return b; + test_debug3 | 14 | return b; (1 row) select funcname, lineno, query from dbe_pldebugger.continue(); @@ -510,13 +510,13 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; --?.* --?.* ---? (.*,test_debug4,5," CASE a") +--? (.*,test_debug4,4," CASE a") (1 row) select funcname, lineno, query from dbe_pldebugger.step(); funcname | lineno | query -------------+--------+----------------------- - test_debug4 | 7 | b := 111; + test_debug4 | 6 | b := 111; (1 row) select * from dbe_pldebugger.info_locals(); @@ -529,7 +529,7 @@ select * from dbe_pldebugger.info_locals(); select funcname, lineno, query from dbe_pldebugger.step(); funcname | lineno | query -------------+--------+--------------------------------- - test_debug4 | 8 | call test_debug(a); + test_debug4 | 7 | call test_debug(a); (1 row) select funcname, lineno, query from dbe_pldebugger.step(); @@ -565,7 +565,7 @@ select funcname, lineno, query from dbe_pldebugger.step(); select funcname, lineno, query from dbe_pldebugger.continue(); funcname | lineno | query -------------+--------+------------------- - test_debug4 | 15 | b := 101; + test_debug4 | 14 | b := 101; (1 row) select funcname, lineno, query from dbe_pldebugger.continue(); @@ -584,19 +584,19 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; attach ------------------------------------ ---? (.*,test_debug4,5," CASE a") +--? (.*,test_debug4,4," CASE a") (1 row) SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step(); funcname | lineno | query -------------+--------+----------------------- - test_debug4 | 7 | b := 111; + test_debug4 | 6 | b := 111; (1 row) SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step(); funcname | lineno | query -------------+--------+--------------------------------- - test_debug4 | 8 | call test_debug(a); + test_debug4 | 7 | call test_debug(a); (1 row) SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step(); @@ -633,7 +633,7 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; --?.* --?.* ---? (.*,test_debug4,5," CASE a") +--? (.*,test_debug4,4," CASE a") (1 row) truncate tmp_holder; @@ -658,7 +658,7 @@ select * from tmp_holder; 2 0:31: SELECT b FROM test where a = 7 INTO b_tmp; 1:44: RAISE INFO 'cnt is %', cnt; - 2:12: return b; + 2:12: raise info 'pi_return : %',pi_return ; (6 rows) select funcname, lineno, query from dbe_pldebugger.continue(); @@ -706,7 +706,7 @@ select frameno, funcname, lineno, query from dbe_pldebugger.backtrace(); frameno | funcname | lineno | query ---------+-------------+--------+------------------------------------------------ 0 | test_debug | 31 | SELECT b FROM test where a = 7 INTO b_tmp; - 1 | test_debug4 | 8 | call test_debug(a); + 1 | test_debug4 | 7 | call test_debug(a); (2 rows) select * from dbe_pldebugger.info_locals(); @@ -748,7 +748,7 @@ select frameno, funcname, lineno, query from dbe_pldebugger.backtrace(); frameno | funcname | lineno | query ---------+-------------+--------+--------------------------------- 0 | test_debug | 44 | RAISE INFO 'cnt is %', cnt; - 1 | test_debug4 | 8 | call test_debug(a); + 1 | test_debug4 | 7 | call test_debug(a); (2 rows) select * from dbe_pldebugger.info_locals(); @@ -799,31 +799,31 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; attach ------------------------------------ ---? (.*,test_debug4,5," CASE a") +--? (.*,test_debug4,4," CASE a") (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+----------------------- - test_debug4 | 7 | b := 111; + test_debug4 | 6 | b := 111; (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+--------------------------------- - test_debug4 | 8 | call test_debug(a); + test_debug4 | 7 | call test_debug(a); (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+------------------- - test_debug4 | 15 | b := 101; + test_debug4 | 14 | b := 101; (1 row) select funcname, lineno, query from dbe_pldebugger.step(); funcname | lineno | query -------------+--------+--------------- - test_debug4 | 16 | return b; + test_debug4 | 15 | return b; (1 row) select funcname, lineno, query from dbe_pldebugger.finish(); @@ -845,7 +845,7 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; attach ------------------------------------ ---? (.*,test_debug4,5," CASE a") +--? (.*,test_debug4,4," CASE a") (1 row) truncate tmp_holder; @@ -874,7 +874,7 @@ select funcname, lineno, query from dbe_pldebugger.finish(); select funcname, lineno, query from dbe_pldebugger.finish(); funcname | lineno | query -------------+--------+------------------- - test_debug4 | 15 | b := 101; + test_debug4 | 14 | b := 101; (1 row) select funcname, lineno, query from dbe_pldebugger.finish(); @@ -1142,7 +1142,7 @@ select pg_sleep(1); select dbe_pldebugger.attach(nodename, port) from debug_info; --?.* --?.* ---? (.*,test_setvar,14," RAISE INFO E'vint:%\\nvnum:%\\nvfloat:%\\nvtext:%\\nvvarchar:%\\nvrow:%\\nvrefcursor:%',") +--? (.*,test_setvar,13," RAISE INFO E'vint:%\\nvnum:%\\nvfloat:%\\nvtext:%\\nvvarchar:%\\nvrow:%\\nvrefcursor:%',") (1 row) select * from dbe_pldebugger.info_locals(); @@ -1171,13 +1171,13 @@ select * from dbe_pldebugger.info_locals(); select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+------------- - test_setvar | 16 | COMMIT; + test_setvar | 15 | COMMIT; (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+------------------------------------------------------------------------- - test_setvar | 17 | SELECT * FROM test ORDER BY 1 LIMIT 1 INTO vrow; -- do set var here + test_setvar | 16 | SELECT * FROM test ORDER BY 1 LIMIT 1 INTO vrow; -- do set var here (1 row) -- immutable to sql injection @@ -1352,13 +1352,13 @@ select * from dbe_pldebugger.info_locals(); select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+---------------------------------------------------------------------------------------- - test_setvar | 18 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%', + test_setvar | 17 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%', (1 row) select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+--------------- - test_setvar | 20 | ROLLBACK; + test_setvar | 19 | ROLLBACK; (1 row) select * from dbe_pldebugger.info_locals(); @@ -1387,7 +1387,7 @@ select * from dbe_pldebugger.info_locals(); select funcname, lineno, query from dbe_pldebugger.next(); funcname | lineno | query -------------+--------+---------------------------------------------------------------------------------------- - test_setvar | 21 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%', + test_setvar | 20 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%', (1 row) select * from dbe_pldebugger.info_locals(); diff --git a/src/test/regress/expected/pl_debugger_server.out b/src/test/regress/expected/pl_debugger_server.out index 33dd529e00..9f0c8d488f 100755 --- a/src/test/regress/expected/pl_debugger_server.out +++ b/src/test/regress/expected/pl_debugger_server.out @@ -379,7 +379,7 @@ select * from debug_info; select * from test_debug4(1); INFO: cnt is 3 CONTEXT: SQL statement "call test_debug(a)" -PL/pgSQL function test_debug4(integer) line 8 at SQL statement +PL/pgSQL function test_debug4(integer) line 7 at SQL statement test_debug4 ------------- 101 @@ -388,12 +388,12 @@ PL/pgSQL function test_debug4(integer) line 8 at SQL statement -- test with client error in exception select * from test_debug4(1); ERROR: receive abort message -CONTEXT: PL/pgSQL function test_debug4(integer) line 15 at assignment +CONTEXT: PL/pgSQL function test_debug4(integer) line 14 at assignment -- test with breakpoint select * from test_debug4(1); INFO: cnt is 3 CONTEXT: SQL statement "call test_debug(a)" -PL/pgSQL function test_debug4(integer) line 8 at SQL statement +PL/pgSQL function test_debug4(integer) line 7 at SQL statement test_debug4 ------------- 101 @@ -403,7 +403,7 @@ PL/pgSQL function test_debug4(integer) line 8 at SQL statement select * from test_debug4(1); INFO: cnt is 3 CONTEXT: SQL statement "call test_debug(a)" -PL/pgSQL function test_debug4(integer) line 8 at SQL statement +PL/pgSQL function test_debug4(integer) line 7 at SQL statement test_debug4 ------------- 101 diff --git a/src/test/regress/expected/plan_table_for_anonymous_block.out b/src/test/regress/expected/plan_table_for_anonymous_block.out index 4801ff8c82..079c7eee1f 100644 --- a/src/test/regress/expected/plan_table_for_anonymous_block.out +++ b/src/test/regress/expected/plan_table_for_anonymous_block.out @@ -51,6 +51,6 @@ end; / NOTICE: table "t_ustore_proc_temp_table_0008" does not exist, skipping CONTEXT: SQL statement "drop table if exists t_ustore_Proc_temp_table_0008" -PL/pgSQL function t_ustore_proc_temp_table_0008(character varying) line 4 at EXECUTE statement +PL/pgSQL function t_ustore_proc_temp_table_0008(character varying) line 3 at EXECUTE statement SQL statement "CALL t_ustore_proc_temp_table_0008(v_name)" -PL/pgSQL function inline_code_block line 4 at PERFORM +PL/pgSQL function inline_code_block line 3 at PERFORM diff --git a/src/test/regress/expected/pldeveloper_gs_source.out b/src/test/regress/expected/pldeveloper_gs_source.out index b037b5304e..d15b2e8c04 100644 --- a/src/test/regress/expected/pldeveloper_gs_source.out +++ b/src/test/regress/expected/pldeveloper_gs_source.out @@ -59,15 +59,14 @@ insert into fasd af asd asdf; end; / NOTICE: syntax error at or near "af" -LINE 3: insert into fasd af asd asdf; +LINE 2: insert into fasd af asd asdf; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin insert into fasd af asd asdf; end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "func1" near line 2 +CONTEXT: compilation of PL/pgSQL function "func1" near line 1 -- package CREATE OR REPLACE PACKAGE emp_bonus9 AS da int; @@ -91,11 +90,10 @@ END; END emp_bonus9; / NOTICE: syntax error at or near "int" when compile function aa(integer,character varying) -LINE 3: insert int aa aa; +LINE 2: insert int aa aa; ^ DETAIL: syntax error -QUERY: DECLARE -BEGIN +QUERY: DECLARE BEGIN insert int aa aa; END ERROR: Debug mod,create procedure has error. @@ -201,15 +199,14 @@ insert into fasd af asd asdf; end; / NOTICE: syntax error at or near "af" -LINE 3: insert into fasd af asd asdf; +LINE 2: insert into fasd af asd asdf; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin insert into fasd af asd asdf; end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "func1" near line 2 +CONTEXT: compilation of PL/pgSQL function "func1" near line 1 set role gs_developper password 'Dev@9999'; set behavior_compat_options='allow_procedure_compile_check'; -- [no log] trigger func @@ -249,11 +246,10 @@ begin end; / NOTICE: unrecognized row security option "whatever" -LINE 3: ...TE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER +LINE 2: ...TE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER ^ HINT: Only PERMISSIVE or RESTRICTIVE policies are supported currently. -QUERY: DECLARE -begin +QUERY: DECLARE begin CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER USING (dlevel <= (SELECT aid FROM account_row WHERE aname = current_user)); insert int asd asd; @@ -261,11 +257,10 @@ begin insert int asd asd; end ERROR: relation "account_row" does not exist -LINE 3: CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS ... +LINE 2: CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS ... ^ DETAIL: -QUERY: DECLARE -begin +QUERY: DECLARE begin CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER USING (dlevel <= (SELECT aid FROM account_row WHERE aname = current_user)); insert int asd asd; @@ -378,7 +373,7 @@ begin end; / ERROR: column "pro70" has pseudo-type void -CONTEXT: compilation of PL/pgSQL function "pro71" near line 2 +CONTEXT: compilation of PL/pgSQL function "pro71" near line 1 create or replace function bulk_f_039_1() returns int[] LANGUAGE plpgsql AS $$ @@ -398,19 +393,17 @@ open v_cur for select c1,c2 from tab1; end; / NOTICE: "v_cur" is not a known variable -LINE 5: open v_cur for select c1,c2 from tab1; +LINE 4: open v_cur for select c1,c2 from tab1; ^ -QUERY: DECLARE -type tpc1 is ref cursor; +QUERY: DECLARE type tpc1 is ref cursor; --v_cur tpc1; begin open v_cur for select c1,c2 from tab1; end ERROR: open cursor error -LINE 5: open v_cur for select c1,c2 from tab1; +LINE 4: open v_cur for select c1,c2 from tab1; ^ -QUERY: DECLARE -type tpc1 is ref cursor; +QUERY: DECLARE type tpc1 is ref cursor; --v_cur tpc1; begin open v_cur for select c1,c2 from tab1; @@ -497,15 +490,14 @@ insert int a; end; / NOTICE: syntax error at or near "int" -LINE 3: insert int a; +LINE 2: insert int a; ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin insert int a; end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "proc4" near line 2 +CONTEXT: compilation of PL/pgSQL function "proc4" near line 1 create or replace package pkg4 is a a; @@ -665,10 +657,9 @@ insert int a; end; / ERROR: syntax error at or near "int" -LINE 5: insert int a; +LINE 4: insert int a; ^ -QUERY: DECLARE -b int; +QUERY: DECLARE b int; c int; begin insert int a; @@ -814,10 +805,9 @@ insert int a; end; / ERROR: syntax error at or near "int" -LINE 5: insert int a; +LINE 4: insert int a; ^ -QUERY: DECLARE -b int; +QUERY: DECLARE b int; c int; begin insert int a; diff --git a/src/test/regress/expected/plpgsql_assign_list.out b/src/test/regress/expected/plpgsql_assign_list.out index b63595ae8a..183b8ea966 100644 --- a/src/test/regress/expected/plpgsql_assign_list.out +++ b/src/test/regress/expected/plpgsql_assign_list.out @@ -286,10 +286,9 @@ select 1,'a','b' into va,vb vc; end; / ERROR: syntax error, expected "," -LINE 6: select 1,'a','b' into va,vb vc; +LINE 5: select 1,'a','b' into va,vb vc; ^ -QUERY: DECLARE -va int; +QUERY: DECLARE va int; vb varchar2; vc varchar2; begin diff --git a/src/test/regress/expected/plpgsql_cursor_rowtype.out b/src/test/regress/expected/plpgsql_cursor_rowtype.out index 7c071a89c1..31a2e34228 100644 --- a/src/test/regress/expected/plpgsql_cursor_rowtype.out +++ b/src/test/regress/expected/plpgsql_cursor_rowtype.out @@ -188,7 +188,7 @@ end pck3; call pck3.ppp1(); INFO: a CONTEXT: SQL statement "CALL ppp2(var1)" -PL/pgSQL function ppp1() line 7 at PERFORM +PL/pgSQL function ppp1() line 6 at PERFORM INFO: a ppp1 ------ @@ -597,7 +597,7 @@ end; / call pro_cs_trans_1(); --?.* -CONTEXT: PL/pgSQL function pro_cs_trans_1() line 11 at CLOSE +CONTEXT: PL/pgSQL function pro_cs_trans_1() line 10 at CLOSE create or replace procedure pro_cs_trans_1() as cursor c1 is select * from cs_trans_1 order by 1; rec_1 cs_trans_1%rowtype; @@ -613,7 +613,7 @@ end; / call pro_cs_trans_1(); --?.* -CONTEXT: PL/pgSQL function pro_cs_trans_1() line 11 at CLOSE +CONTEXT: PL/pgSQL function pro_cs_trans_1() line 10 at CLOSE create or replace procedure pro_cs_trans_1() as cursor c1 is select * from cs_trans_1 order by 1; rec_1 cs_trans_1%rowtype; diff --git a/src/test/regress/expected/plpgsql_inout_param.out b/src/test/regress/expected/plpgsql_inout_param.out index ed98ec237a..684bdc04bd 100644 --- a/src/test/regress/expected/plpgsql_inout_param.out +++ b/src/test/regress/expected/plpgsql_inout_param.out @@ -674,7 +674,7 @@ end; call proc15(); ERROR: schema "rec" does not exist CONTEXT: SQL statement "CALL proc1(rec.c_info.id,1)" -PL/pgSQL function proc15() line 5 at SQL statement +PL/pgSQL function proc15() line 4 at SQL statement create or replace procedure proc15() is rec record; @@ -686,11 +686,11 @@ end loop; end; / ERROR: when invoking function proc1, no destination for argments "a1" -CONTEXT: compilation of PL/pgSQL function "proc15" near line 4 +CONTEXT: compilation of PL/pgSQL function "proc15" near line 3 call proc15(); ERROR: schema "rec" does not exist CONTEXT: SQL statement "CALL proc1(rec.c_info.id,1)" -PL/pgSQL function proc15() line 5 at SQL statement +PL/pgSQL function proc15() line 4 at SQL statement create or replace procedure proc16(a1 in out varchar) is begin @@ -913,7 +913,7 @@ end; call proc3(); INFO: CONTEXT: SQL statement "CALL proc1(a2[1],a2[2])" -PL/pgSQL function proc3() line 9 at SQL statement +PL/pgSQL function proc3() line 8 at SQL statement INFO: a2:{10000,20000} INFO: a1:1 proc3 @@ -938,7 +938,7 @@ end; call proc3(); INFO: CONTEXT: SQL statement "CALL proc1(c1=>a2[1],c2=>a2[2])" -PL/pgSQL function proc3() line 9 at SQL statement +PL/pgSQL function proc3() line 8 at SQL statement INFO: a2:{10000,20000} INFO: a1:1 proc3 @@ -1068,11 +1068,11 @@ end; call proc3(); INFO: a1:10000 CONTEXT: SQL statement "CALL proc1(a2[1])" -PL/pgSQL function proc3() line 7 at SQL statement +PL/pgSQL function proc3() line 6 at SQL statement INFO: a2:{10000} INFO: a1:10000 CONTEXT: SQL statement "CALL proc1(a1)" -PL/pgSQL function proc3() line 9 at SQL statement +PL/pgSQL function proc3() line 8 at SQL statement INFO: a1:10000 proc3 ------- @@ -1095,11 +1095,11 @@ end; call proc3(); INFO: a1:10000 CONTEXT: SQL statement "CALL proc1(a1=>a2[1])" -PL/pgSQL function proc3() line 7 at SQL statement +PL/pgSQL function proc3() line 6 at SQL statement INFO: a2:{10000} INFO: a1:10000 CONTEXT: SQL statement "CALL proc1(a1=>a1)" -PL/pgSQL function proc3() line 9 at SQL statement +PL/pgSQL function proc3() line 8 at SQL statement INFO: a1:10000 proc3 ------- @@ -1122,11 +1122,11 @@ end; call proc3(); INFO: a1:10000 CONTEXT: SQL statement "CALL proc1(a2[1])" -PL/pgSQL function proc3() line 7 at SQL statement +PL/pgSQL function proc3() line 6 at SQL statement INFO: a2:{10000} INFO: a1:10000 CONTEXT: SQL statement "CALL proc1(a1)" -PL/pgSQL function proc3() line 9 at SQL statement +PL/pgSQL function proc3() line 8 at SQL statement INFO: a1:10000 proc3 ------- @@ -1209,7 +1209,7 @@ end; call p2(); INFO: 12 CONTEXT: SQL statement "CALL p1(c1=>'12',c2=>a)" -PL/pgSQL function p2() line 4 at SQL statement +PL/pgSQL function p2() line 3 at SQL statement INFO: {1,2} p2 ---- @@ -1261,11 +1261,11 @@ NOTICE: others :relation "test_tb1" does not exist on datanode1 CONTEXT: SQL statement "CALL pp11(v121=>v01.v01,v122=>v122)" --?.* SQL statement "CALL pck5.pp11(v01)" -PL/pgSQL function fun1() line 4 at SQL statement +PL/pgSQL function fun1() line 3 at SQL statement referenced column: fun1 NOTICE: v01 : 2 CONTEXT: SQL statement "CALL pck5.pp11(v01)" -PL/pgSQL function fun1() line 4 at SQL statement +PL/pgSQL function fun1() line 3 at SQL statement referenced column: fun1 fun1 ------ @@ -1300,11 +1300,11 @@ NOTICE: others :relation "test_tb1" does not exist on datanode1 CONTEXT: SQL statement "CALL pp11(v01.v01,v122)" --?.* SQL statement "CALL pck5.pp11(v01)" -PL/pgSQL function fun1() line 4 at SQL statement +PL/pgSQL function fun1() line 3 at SQL statement referenced column: fun1 NOTICE: v01 : 2 CONTEXT: SQL statement "CALL pck5.pp11(v01)" -PL/pgSQL function fun1() line 4 at SQL statement +PL/pgSQL function fun1() line 3 at SQL statement referenced column: fun1 fun1 ------ @@ -1362,7 +1362,7 @@ end; / NOTICE: v_out : (1,1,a,b,c) CONTEXT: SQL statement "CALL pck8.pp11('a','b',va)" -PL/pgSQL function inline_code_block line 4 at SQL statement +PL/pgSQL function inline_code_block line 3 at SQL statement drop package pck5; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function plpgsql_inout.pp11() @@ -1394,7 +1394,7 @@ pp1(vd=>v1, va=>v1, vb=>v1); end; / ERROR: when invoking function pp1, no argments match "vd" -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1 drop procedure pp1; -- two out param, one is valid (should error) drop package if exists pck1; @@ -1420,7 +1420,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 3 at SQL statement drop package pck1; NOTICE: drop cascades to function plpgsql_inout.p1() -- two out param, one is valid, overload situation (should error) @@ -1483,10 +1483,10 @@ INFO: tbcor2 is {2,23} INFO: tbcor2.count is 2 INFO: 2 parameter col5 is 2 CONTEXT: SQL statement "CALL proc070_1(tbcor2,ARRAY_INDEXBY_LENGTH("tbcor2", 1 ) )" -PL/pgSQL function proc070_2() line 14 at SQL statement +PL/pgSQL function proc070_2() line 13 at SQL statement ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function proc070_2() line 14 at SQL statement +CONTEXT: PL/pgSQL function proc070_2() line 13 at SQL statement drop package pkg070; NOTICE: drop cascades to 3 other objects DETAIL: drop cascades to function plpgsql_inout.proc070_1() @@ -1506,7 +1506,7 @@ pp1(a=>var1,b=>3); end; / ERROR: when invoking function pp1, no destination for argments "b" -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1 drop procedure pp1; -- test one in row, one out shcalar -- 1 @@ -1543,7 +1543,7 @@ end; / INFO: b:2 CONTEXT: SQL statement "CALL pck1.p1(var1,var)" -PL/pgSQL function inline_code_block line 6 at SQL statement +PL/pgSQL function inline_code_block line 5 at SQL statement INFO: var:2 drop package if exists pck1; NOTICE: drop cascades to 2 other objects @@ -1585,10 +1585,10 @@ end; / INFO: b:3 CONTEXT: SQL statement "CALL pck1.p1(var1,var)" -PL/pgSQL function inline_code_block line 7 at SQL statement +PL/pgSQL function inline_code_block line 6 at SQL statement INFO: b2:2 CONTEXT: SQL statement "CALL pck1.p1(var2,varr)" -PL/pgSQL function inline_code_block line 8 at SQL statement +PL/pgSQL function inline_code_block line 7 at SQL statement INFO: var:3 drop package if exists pck1; NOTICE: drop cascades to 2 other objects @@ -1667,7 +1667,7 @@ end; / INFO: b2:3 CONTEXT: SQL statement "CALL pck1.p1(a2=>array[1,3],b2=>var)" -PL/pgSQL function inline_code_block line 4 at SQL statement +PL/pgSQL function inline_code_block line 3 at SQL statement INFO: var:3 drop package pck1; NOTICE: drop cascades to 2 other objects @@ -1706,7 +1706,7 @@ pck3.p1(a2=>(1,2,3)::pck2.tp_1); end; / ERROR: Named argument "a2" can not be a const -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 3 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2 drop package pck3; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function plpgsql_inout.p1() @@ -1736,7 +1736,7 @@ raise info 'var:%',var; end; / ERROR: when invoking function pck1.p1, no destination for argments "c" -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1 drop package pck1; NOTICE: drop cascades to function plpgsql_inout.p1(integer,character varying) -- b. function no assign @@ -1790,7 +1790,7 @@ end; INFO: c:{3} CONTEXT: referenced column: f1 SQL statement "SELECT pck1.f1(a => x,c=> pck1.va)" -PL/pgSQL function inline_code_block line 7 at assignment +PL/pgSQL function inline_code_block line 6 at assignment INFO: res:10 INFO: z: declare @@ -1806,7 +1806,7 @@ end; INFO: c: CONTEXT: referenced column: f1 SQL statement "SELECT pck1.f1(a => x,c=> z)" -PL/pgSQL function inline_code_block line 6 at assignment +PL/pgSQL function inline_code_block line 5 at assignment INFO: res:10 INFO: z: drop package pck1; diff --git a/src/test/regress/expected/plpgsql_override_out.out b/src/test/regress/expected/plpgsql_override_out.out index 1dc9eab29b..2b2bcf4ec9 100644 --- a/src/test/regress/expected/plpgsql_override_out.out +++ b/src/test/regress/expected/plpgsql_override_out.out @@ -556,10 +556,10 @@ end; / INFO: b:1 CONTEXT: SQL statement "CALL pck1.p1((1,'b',2),'a')" -PL/pgSQL function inline_code_block line 3 at SQL statement +PL/pgSQL function inline_code_block line 2 at SQL statement ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 3 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 2 at SQL statement drop table if exists test_tb; NOTICE: table "test_tb" does not exist, skipping create table test_tb(c1 int,c2 varchar2); @@ -855,7 +855,7 @@ raise info 'aa=%',aa; end; / ERROR: when invoking function p11, no destination for argments num "a" -CONTEXT: compilation of PL/pgSQL function "p112" near line 4 +CONTEXT: compilation of PL/pgSQL function "p112" near line 3 drop procedure if exists p112(out int); NOTICE: function p112(pg_catalog.int4) does not exist, skipping create procedure p112(a out int) is @@ -868,7 +868,7 @@ raise info 'aa=%',aa; end; / ERROR: when invoking function p11, no destination for argments num "a" -CONTEXT: compilation of PL/pgSQL function "p112" near line 4 +CONTEXT: compilation of PL/pgSQL function "p112" near line 3 drop procedure if exists p112(out int); NOTICE: function p112(pg_catalog.int4) does not exist, skipping create procedure p112(a out int) is @@ -881,7 +881,7 @@ raise info 'aa=%',aa; end; / ERROR: when invoking function p11, no destination for argments num "a" -CONTEXT: compilation of PL/pgSQL function "p112" near line 4 +CONTEXT: compilation of PL/pgSQL function "p112" near line 3 drop procedure if exists p112(out int); NOTICE: function p112(pg_catalog.int4) does not exist, skipping create procedure p112(a out int) is @@ -894,7 +894,7 @@ raise info 'aa=%',aa; end; / ERROR: when invoking function p11, no destination for argments num "a" -CONTEXT: compilation of PL/pgSQL function "p112" near line 4 +CONTEXT: compilation of PL/pgSQL function "p112" near line 3 drop procedure if exists p112(out int); NOTICE: function p112(pg_catalog.int4) does not exist, skipping create procedure p112(a out int) is @@ -927,7 +927,7 @@ raise info 'aa=%',aa; end; / ERROR: when invoking function p11, no destination for argments num "a" -CONTEXT: compilation of PL/pgSQL function "p112" near line 4 +CONTEXT: compilation of PL/pgSQL function "p112" near line 3 drop package if exists pck1; NOTICE: package pck1() does not exist, skipping create or replace package pck1 is @@ -955,7 +955,7 @@ end; / ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 3 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 2 at SQL statement drop package if exists pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function plpgsql_override_out.p1() @@ -991,10 +991,10 @@ end; / INFO: b:bb CONTEXT: SQL statement "CALL pck1.p1((1,'bb','11'),array[2,3,4],var2)" -PL/pgSQL function inline_code_block line 5 at SQL statement +PL/pgSQL function inline_code_block line 4 at SQL statement ERROR: query has no destination for result data HINT: If you want to discard the results of a SELECT, use PERFORM instead. -CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement declare var1 pck1.tp_2; var2 varchar2; @@ -1003,7 +1003,7 @@ perform pck1.p1(a=>(1,'bb','11'),c=>var1,b=>'aa');--报错 end; / ERROR: Named argument "b" can not be a const -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 5 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 4 set plsql_compile_check_options=''; drop package if exists pck1; NOTICE: drop cascades to 2 other objects diff --git a/src/test/regress/expected/plpgsql_package_type.out b/src/test/regress/expected/plpgsql_package_type.out index 694af8b685..33aaa1e215 100644 --- a/src/test/regress/expected/plpgsql_package_type.out +++ b/src/test/regress/expected/plpgsql_package_type.out @@ -263,10 +263,9 @@ end; end test_cur2; / ERROR: "cur1.a.a" is not a known variable -LINE 3: cur1.a.a:=2; +LINE 2: cur1.a.a:=2; ^ -QUERY: DECLARE -BEGIN +QUERY: DECLARE BEGIN cur1.a.a:=2; end create or replace package test_cur3 @@ -290,10 +289,9 @@ end; end test_cur3; / ERROR: "cur1.a.a" is not a known variable -LINE 3: cur1.a.a:=2; +LINE 2: cur1.a.a:=2; ^ -QUERY: DECLARE -BEGIN +QUERY: DECLARE BEGIN cur1.a.a:=2; end create or replace package test_cur4 @@ -318,10 +316,9 @@ end; end test_cur4; / ERROR: "cur1.a.a" is not a known variable -LINE 3: cur1.a.a:=2; +LINE 2: cur1.a.a:=2; ^ -QUERY: DECLARE -BEGIN +QUERY: DECLARE BEGIN cur1.a.a:=2; cur.a.a:=2; end @@ -449,7 +446,7 @@ end; / ERROR: array type nested by array is not supported yet. DETAIL: Define array type "t2" of array is not supported yet. -CONTEXT: compilation of PL/pgSQL function "func1" near line 3 +CONTEXT: compilation of PL/pgSQL function "func1" near line 2 -- 2. table nest array create or replace package pck1 as type t1 is varray(10) of int; @@ -468,7 +465,7 @@ end; / ERROR: array type nested by table type is not supported yet. DETAIL: Define table type "t2" of array is not supported yet. -CONTEXT: compilation of PL/pgSQL function "func1" near line 3 +CONTEXT: compilation of PL/pgSQL function "func1" near line 2 -- 3. array nest table create or replace package pck1 as type t1 is table of int; @@ -487,7 +484,7 @@ end; / ERROR: table type nested by array is not supported yet. DETAIL: Define array type "t2" of table type is not supported yet. -CONTEXT: compilation of PL/pgSQL function "func1" near line 3 +CONTEXT: compilation of PL/pgSQL function "func1" near line 2 -- 4. table nest table, will be supported soon -- create or replace package pck1 as -- type t1 is table of int; @@ -521,7 +518,7 @@ end; / ERROR: ref cursor type nested by record is not supported yet. DETAIL: Define a record type of ref cursor type is not supported yet. -CONTEXT: compilation of PL/pgSQL function "func1" near line 3 +CONTEXT: compilation of PL/pgSQL function "func1" near line 2 -- 6. table nest ref cursor create or replace package pck1 as type t1 is ref cursor; @@ -540,7 +537,7 @@ end; / ERROR: ref cursor type nested by table type is not supported yet. DETAIL: Define table type "t2" of ref cursor is not supported yet. -CONTEXT: compilation of PL/pgSQL function "func1" near line 3 +CONTEXT: compilation of PL/pgSQL function "func1" near line 2 -- 7. varray nest ref cursor create or replace package pck1 as type t1 is ref cursor; @@ -559,7 +556,7 @@ end; / ERROR: ref cursor type nested by array is not supported yet. DETAIL: Define array type "t2" of ref cursor type is not supported yet. -CONTEXT: compilation of PL/pgSQL function "func1" near line 3 +CONTEXT: compilation of PL/pgSQL function "func1" near line 2 DROP package pck1; ERROR: package pck1 does not exist DROP function func1(); @@ -721,10 +718,10 @@ end pck1; call pck1.p1(); INFO: (1,2) CONTEXT: SQL statement "CALL p2(va)" -PL/pgSQL function p1() line 5 at PERFORM +PL/pgSQL function p1() line 4 at PERFORM INFO: (4,5) CONTEXT: SQL statement "CALL p2(va)" -PL/pgSQL function p1() line 7 at PERFORM +PL/pgSQL function p1() line 6 at PERFORM p1 ---- @@ -833,9 +830,9 @@ call pck1.p1(); INFO: (1,2) INFO: (,) CONTEXT: SQL statement "CALL p2(vb)" -PL/pgSQL function p1() line 9 at SQL statement +PL/pgSQL function p1() line 8 at SQL statement ERROR: mismatch between assignment and variable filed. -CONTEXT: PL/pgSQL function p1() line 9 at SQL statement +CONTEXT: PL/pgSQL function p1() line 8 at SQL statement DROP PACKAGE pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function plpgsql_packagetype2.p1() @@ -870,9 +867,9 @@ call pck1.p1(); INFO: (1,2) INFO: (,) CONTEXT: SQL statement "CALL p2(vb)" -PL/pgSQL function p1() line 9 at SQL statement +PL/pgSQL function p1() line 8 at SQL statement ERROR: mismatch between assignment and variable filed. -CONTEXT: PL/pgSQL function p1() line 9 at SQL statement +CONTEXT: PL/pgSQL function p1() line 8 at SQL statement DROP PACKAGE pck1; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function plpgsql_packagetype2.p1() @@ -907,7 +904,7 @@ call pck1.p1(); INFO: (1,2) --?.* CONTEXT: SQL statement "CALL p2(vb)" -PL/pgSQL function p1() line 9 at SQL statement +PL/pgSQL function p1() line 8 at SQL statement INFO: (1,2) p1 ---- @@ -1022,7 +1019,7 @@ call p1(); ERROR: type "pck1.r1" is not supported as column type DETAIL: "pck1.r1" is a package or procedure type CONTEXT: SQL statement "create table t1(a pck1.r1)" -PL/pgSQL function p1() line 3 at SQL statement +PL/pgSQL function p1() line 2 at SQL statement create or replace procedure p1 as begin create table t1(a pck1.r2); @@ -1032,7 +1029,7 @@ call p1(); ERROR: type "pck1.r2" is not supported as column type DETAIL: "pck1.r2" is a package or procedure type CONTEXT: SQL statement "create table t1(a pck1.r2)" -PL/pgSQL function p1() line 3 at SQL statement +PL/pgSQL function p1() line 2 at SQL statement create or replace procedure p1 as begin create table t1(a pck1.r3); @@ -1042,7 +1039,7 @@ call p1(); ERROR: type "pck1.r3" is not supported as column type DETAIL: "pck1.r3" is a package or procedure type CONTEXT: SQL statement "create table t1(a pck1.r3)" -PL/pgSQL function p1() line 3 at SQL statement +PL/pgSQL function p1() line 2 at SQL statement create or replace procedure p1 as begin create type o1 as (a pck1.r1); @@ -1052,7 +1049,7 @@ call p1(); ERROR: type "pck1.r1" is not supported as column type DETAIL: "pck1.r1" is a package or procedure type CONTEXT: SQL statement "create type o1 as (a pck1.r1)" -PL/pgSQL function p1() line 3 at SQL statement +PL/pgSQL function p1() line 2 at SQL statement create or replace procedure p1 as begin create type o1 as (a pck1.r2); @@ -1062,7 +1059,7 @@ call p1(); ERROR: type "pck1.r2" is not supported as column type DETAIL: "pck1.r2" is a package or procedure type CONTEXT: SQL statement "create type o1 as (a pck1.r2)" -PL/pgSQL function p1() line 3 at SQL statement +PL/pgSQL function p1() line 2 at SQL statement create or replace procedure p1 as begin create type o1 as (a pck1.r3); @@ -1072,7 +1069,7 @@ call p1(); ERROR: type "pck1.r3" is not supported as column type DETAIL: "pck1.r3" is a package or procedure type CONTEXT: SQL statement "create type o1 as (a pck1.r3)" -PL/pgSQL function p1() line 3 at SQL statement +PL/pgSQL function p1() line 2 at SQL statement DROP procedure p1; DROP package pck1; -- test package-depended type clean @@ -1343,11 +1340,10 @@ end; end pck1; / ERROR: record type with table of attribute is not suppoted to be referenced by another package. -LINE 2: vb pck1.r1; - ^ +LINE 1: DECLARE vb pck1.r1; + ^ DETAIL: attribute "a" of record type "r1" is table of with index by, which is not supported to be referenced by another package. -QUERY: DECLARE -vb pck1.r1; +QUERY: DECLARE vb pck1.r1; begin null; end @@ -1366,11 +1362,10 @@ null; end; / ERROR: record type with table of attribute is not suppoted to be referenced by another package. -LINE 2: va pck1.r1; - ^ +LINE 1: DECLARE va pck1.r1; + ^ DETAIL: attribute "a" of record type "r1" is table of with index by, which is not supported to be referenced by another package. -QUERY: DECLARE -va pck1.r1; +QUERY: DECLARE va pck1.r1; begin null; end diff --git a/src/test/regress/expected/plpgsql_table_opengauss.out b/src/test/regress/expected/plpgsql_table_opengauss.out index 028f2d8810..06900100cd 100644 --- a/src/test/regress/expected/plpgsql_table_opengauss.out +++ b/src/test/regress/expected/plpgsql_table_opengauss.out @@ -644,10 +644,9 @@ begin end; / ERROR: syntax error at or near "[" -LINE 7: insert into customers values (customer_table[1].id, custome... +LINE 6: insert into customers values (customer_table[1].id, custome... ^ -QUERY: -declare +QUERY: declare type c_list is TABLE of customers%rowtype; customer_table c_list:=c_list(); begin @@ -716,7 +715,7 @@ end; ERROR: mismatched brackets at or near ";" LINE 6: RAISE INFO 'Student: %', names(i]; ^ -QUERY: DECLARE type students is table of varchar2(10); +QUERY: DECLARE type students is table of varchar2(10); names students; begin names := students(1, 'Zera ', 'Alice', 'Jim ', 'Kevin'); -- should be able read all values correctly -- @@ -826,9 +825,9 @@ begin end; / ERROR: syntax error at or near "(" -LINE 1: DECLARE type arrayfirst is table(10) of int[]; - ^ -QUERY: DECLARE type arrayfirst is table(10) of int[]; +LINE 1: DECLARE type arrayfirst is table(10) of int[]; + ^ +QUERY: DECLARE type arrayfirst is table(10) of int[]; arr arrayfirst := arrayfirst(); begin diff --git a/src/test/regress/expected/plsql_show_all_error.out b/src/test/regress/expected/plsql_show_all_error.out index 55c6720f2f..6e00c1af85 100644 --- a/src/test/regress/expected/plsql_show_all_error.out +++ b/src/test/regress/expected/plsql_show_all_error.out @@ -73,7 +73,7 @@ BEGIN END; / ERROR: unrecognized exception condition "division_by_zeros" -CONTEXT: compilation of PL/pgSQL function "exce_pro2" near line 5 +CONTEXT: compilation of PL/pgSQL function "exce_pro2" near line 4 create or replace procedure pro1 as begin @@ -88,10 +88,9 @@ creat table (c1 int,c2 int) t1; --顺序错误 end; / NOTICE: syntax error at or near "t1" -LINE 3: drop t1; --缺失table关键字 +LINE 2: drop t1; --缺失table关键字 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -102,10 +101,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "tables" -LINE 4: drop tables t1; --错写 +LINE 3: drop tables t1; --错写 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -116,10 +114,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "crop" -LINE 5: crop table t1; --错写 +LINE 4: crop table t1; --错写 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -130,10 +127,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "t2" -LINE 6: create table t1 t2(c1 int,c2 int);--表名不正确 +LINE 5: create table t1 t2(c1 int,c2 int);--表名不正确 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -144,10 +140,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "int" -LINE 7: create table t1(c1 ,c2 int);--漏写数据类型 +LINE 6: create table t1(c1 ,c2 int);--漏写数据类型 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -158,10 +153,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "tables" -LINE 8: create tables t1(c1 int,c2 int); --行号不对 +LINE 7: create tables t1(c1 int,c2 int); --行号不对 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -172,10 +166,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "creat" -LINE 9: creat table t1(c1 int,c2 int); --未标行号 +LINE 8: creat table t1(c1 int,c2 int); --未标行号 ^ -QUERY: DECLARE -begin +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -186,10 +179,9 @@ creat table t1(c1 int,c2 int); --未标行号 creat table (c1 int,c2 int) t1; --顺序错误 end NOTICE: syntax error at or near "creat" -LINE 10: creat table (c1 int,c2 int) t1; --顺序错误 - ^ -QUERY: DECLARE -begin +LINE 9: creat table (c1 int,c2 int) t1; --顺序错误 + ^ +QUERY: DECLARE begin drop t1; --缺失table关键字 drop tables t1; --错写 crop table t1; --错写 @@ -201,7 +193,7 @@ creat table (c1 int,c2 int) t1; --顺序错误 end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "pro1" near line 2 +CONTEXT: compilation of PL/pgSQL function "pro1" near line 1 select line,src from dbe_pldeveloper.gs_errors where name='pro1'; line | src ------+-------------- @@ -1455,7 +1447,7 @@ ERROR: relation "dd_bb_cc_rel" does not exist LINE 3: SELECT count(*) INTO temp FROM DD_BB_CC_REL WHERE BB_ID... ^ DETAIL: -QUERY: DECLARE temp INTEGER; +QUERY: DECLARE temp INTEGER; BEGIN SELECT count(*) INTO temp FROM DD_BB_CC_REL WHERE BB_ID=BBId; RETURN temp; @@ -1473,19 +1465,17 @@ open v_cur for select c1,c2 from tab1; end; / NOTICE: "v_cur" is not a known variable -LINE 5: open v_cur for select c1,c2 from tab1; +LINE 4: open v_cur for select c1,c2 from tab1; ^ -QUERY: DECLARE -type tpc1 is ref cursor; +QUERY: DECLARE type tpc1 is ref cursor; --v_cur tpc1; begin open v_cur for select c1,c2 from tab1; end ERROR: open cursor error -LINE 5: open v_cur for select c1,c2 from tab1; +LINE 4: open v_cur for select c1,c2 from tab1; ^ -QUERY: DECLARE -type tpc1 is ref cursor; +QUERY: DECLARE type tpc1 is ref cursor; --v_cur tpc1; begin open v_cur for select c1,c2 from tab1; @@ -1501,10 +1491,9 @@ forall i in 1 .. v1.count save exceptions end; / ERROR: invalid type's rel tuple for insert. at or near ";" -LINE 6: insert into tb values v1(i); +LINE 5: insert into tb values v1(i); ^ -QUERY: DECLARE -type t1 is table of tb.eno%type; +QUERY: DECLARE type t1 is table of tb.eno%type; v1 t1; begin forall i in 1 .. v1.count save exceptions @@ -1533,19 +1522,17 @@ end; end pack2; / NOTICE: syntax error at or near "table" when compile function pro1() -LINE 3: update table t1 set c1=1 and c2=1; +LINE 2: update table t1 set c1=1 and c2=1; ^ DETAIL: syntax error -QUERY: DECLARE -begin +QUERY: DECLARE begin update table t1 set c1=1 and c2=1; end NOTICE: syntax error at or near "table" when compile function pro2() -LINE 3: update table t1 set c1=1 and c2=1; +LINE 2: update table t1 set c1=1 and c2=1; ^ DETAIL: syntax error -QUERY: DECLARE -begin +QUERY: DECLARE begin update table t1 set c1=1 and c2=1; end ERROR: Debug mod,create procedure has error. @@ -1564,17 +1551,16 @@ return n; end; / NOTICE: empty index at or near ")" -LINE 4: n := v(); +LINE 3: n := v(); ^ -QUERY: DECLARE -n int; +QUERY: DECLARE n int; begin n := v(); return n; end ERROR: Debug mod,create procedure has error. DETAIL: N/A -CONTEXT: compilation of PL/pgSQL function "f" near line 3 +CONTEXT: compilation of PL/pgSQL function "f" near line 2 create or replace PACKAGE z_pk2 AS PROCEDURE pro(p1 int); @@ -1668,7 +1654,7 @@ end; / ERROR: array element type is not composite in assignment DETAIL: array variable "tblof001" must be composite when assign value to attibute -CONTEXT: compilation of PL/pgSQL function "pro_tblof_pro_013_1" near line 8 +CONTEXT: compilation of PL/pgSQL function "pro_tblof_pro_013_1" near line 7 drop procedure pro_tblof_pro_013_1(); ERROR: function pro_tblof_pro_013_1 does not exist drop type pro_tblof_013; @@ -1685,10 +1671,9 @@ begin end; / NOTICE: syntax error at or near ";" -LINE 4: select c1 from t1 into ; +LINE 3: select c1 from t1 into ; ^ -QUERY: DECLARE -a int; +QUERY: DECLARE a int; begin select c1 from t1 into ; select c1 from t1 limit 1 a; @@ -1696,11 +1681,10 @@ begin select c1 from t1 into b; end ERROR: relation "t1" does not exist -LINE 4: select c1 from t1 into ; +LINE 3: select c1 from t1 into ; ^ DETAIL: -QUERY: DECLARE -a int; +QUERY: DECLARE a int; begin select c1 from t1 into ; select c1 from t1 limit 1 a; @@ -1716,26 +1700,24 @@ begin end; / NOTICE: syntax error at or near "from" -LINE 4: select into a from t1.c1; +LINE 3: select into a from t1.c1; ^ -QUERY: DECLARE -a int; +QUERY: DECLARE a int; begin select into a from t1.c1; select 1 into ab; end NOTICE: syntax error at or near "from" -LINE 2: a int; - ^ -QUERY: DECLARE -a int; +LINE 1: DECLARE a int; + ^ +QUERY: DECLARE a int; begin select into a from t1.c1; select 1 into ab; end ERROR: compile failed when parse the query: select from t1.c1 DETAIL: unexpected null parsetree list -CONTEXT: compilation of PL/pgSQL function "pro20" near line 4 +CONTEXT: compilation of PL/pgSQL function "pro20" near line 3 create or replace procedure pro21 as a int; @@ -1746,21 +1728,19 @@ begin end; / NOTICE: "ab" is not a known variable -LINE 4: select 1 into ab; +LINE 3: select 1 into ab; ^ -QUERY: DECLARE -a int; +QUERY: DECLARE a int; begin select 1 into ab; select 1 intoo a; dbe_output.print_line('a is:'||a); end ERROR: Invalid use of identifiers. -LINE 5: select 1 intoo a; +LINE 4: select 1 intoo a; ^ DETAIL: Syntax error found near token "intoo" -QUERY: DECLARE -a int; +QUERY: DECLARE a int; begin select 1 into ab; select 1 intoo a; @@ -1777,7 +1757,7 @@ begin end; / ERROR: schema "dbe_output" does not exist -CONTEXT: compilation of PL/pgSQL function "pro22" near line 6 +CONTEXT: compilation of PL/pgSQL function "pro22" near line 5 set behavior_compat_options = ''; drop package if exists package_020; NOTICE: drop cascades to 2 other objects diff --git a/src/test/regress/expected/select_where_func.out b/src/test/regress/expected/select_where_func.out index 263208e8de..df2b100e0c 100644 --- a/src/test/regress/expected/select_where_func.out +++ b/src/test/regress/expected/select_where_func.out @@ -226,7 +226,7 @@ end; / INFO: proc1 CONTEXT: SQL statement "CALL call_test.proc1()" -PL/pgSQL function inline_code_block line 3 at PERFORM +PL/pgSQL function inline_code_block line 2 at PERFORM select * from t1 where c1 = call_test.func1; c1 ---- @@ -261,7 +261,7 @@ call_test.func2; end; / ERROR: function call_test.func2 has no enough parameters -CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2 +CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1 declare var int; begin @@ -283,7 +283,7 @@ ERROR: missing FROM-clause entry for table "call_test" LINE 1: select c1 from t1 where c1 = call_test.func2 ^ QUERY: select c1 from t1 where c1 = call_test.func2 -CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement +CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement drop package call_test; NOTICE: drop cascades to 6 other objects DETAIL: drop cascades to function sch2.func1() diff --git a/src/test/regress/expected/single_node_function_commit_rollback.out b/src/test/regress/expected/single_node_function_commit_rollback.out index 99e49cb037..18223a9e05 100644 --- a/src/test/regress/expected/single_node_function_commit_rollback.out +++ b/src/test/regress/expected/single_node_function_commit_rollback.out @@ -9,7 +9,7 @@ end; call test_without_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_without_commit() line 3 at SQL statement +PL/pgSQL function test_without_commit() line 2 at SQL statement test_without_commit --------------------- @@ -57,7 +57,7 @@ end; call test_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit() line 3 at SQL statement +PL/pgSQL function test_commit() line 2 at SQL statement test_commit ------------- @@ -83,7 +83,7 @@ end; call test_commit_insert_option(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_option() line 3 at SQL statement +PL/pgSQL function test_commit_insert_option() line 2 at SQL statement test_commit_insert_option --------------------------- @@ -110,7 +110,7 @@ end; call test_commit_insert_delete(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete() line 2 at SQL statement test_commit_insert_delete --------------------------- @@ -136,7 +136,7 @@ end; call test_commit_insert_update(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update() line 2 at SQL statement test_commit_insert_update --------------------------- @@ -163,7 +163,7 @@ end; call test_commit_insert_update_delete(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_delete() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_delete() line 2 at SQL statement test_commit_insert_update_delete ---------------------------------- @@ -190,7 +190,7 @@ end; call test_commit_insert_delete_update(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_update() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_update() line 2 at SQL statement test_commit_insert_delete_update ---------------------------------- @@ -217,7 +217,7 @@ end; call test_commit_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_commit() line 3 at SQL statement +PL/pgSQL function test_commit_commit() line 2 at SQL statement test_commit_commit -------------------- @@ -247,7 +247,7 @@ end; call test_commit_commit1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_commit1() line 3 at SQL statement +PL/pgSQL function test_commit_commit1() line 2 at SQL statement test_commit_commit1 --------------------- @@ -274,7 +274,7 @@ end; call test_commit_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_rollback() line 2 at SQL statement test_commit_rollback ---------------------- @@ -303,7 +303,7 @@ end; call test_commit_rollback1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_rollback1() line 3 at SQL statement +PL/pgSQL function test_commit_rollback1() line 2 at SQL statement test_commit_rollback1 ----------------------- @@ -338,10 +338,10 @@ end; call test_rollback_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback_commit() line 3 at SQL statement +PL/pgSQL function test_rollback_commit() line 2 at SQL statement NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback_commit() line 8 at SQL statement +PL/pgSQL function test_rollback_commit() line 7 at SQL statement test_rollback_commit ---------------------- @@ -372,7 +372,7 @@ end; call test_commit_insert_exception_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_exception_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_insert_exception_rollback() line 2 at SQL statement test_commit_insert_exception_rollback --------------------------------------- @@ -403,7 +403,7 @@ end; call test_commit_insert_exception_commit_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_exception_commit_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_insert_exception_commit_rollback() line 2 at SQL statement test_commit_insert_exception_commit_rollback ---------------------------------------------- @@ -430,7 +430,7 @@ end; call test_commit_insert_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -454,7 +454,7 @@ end; call test_commit_insert_delete_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -477,7 +477,7 @@ end; call test_commit_insert_update_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -501,7 +501,7 @@ end; call test_commit_insert_update_delete_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_delete_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_delete_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -525,7 +525,7 @@ end; call test_commit_insert_delete_update_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_update_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_update_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -547,7 +547,7 @@ end; call test_commit_insert_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -570,7 +570,7 @@ end; call test_commit_insert_delete_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -592,7 +592,7 @@ end; call test_commit_insert_update_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -615,7 +615,7 @@ end; call test_commit_insert_update_delete_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_delete_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_delete_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -639,7 +639,7 @@ end; call test_commit_insert_delete_update_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_update_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_update_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -665,7 +665,7 @@ end; call test_exception_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_exception_commit() line 3 at SQL statement +PL/pgSQL function test_exception_commit() line 2 at SQL statement test_exception_commit ----------------------- @@ -697,7 +697,7 @@ end; call test_exception_commit_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_exception_commit_commit_raise() line 3 at SQL statement +PL/pgSQL function test_exception_commit_commit_raise() line 2 at SQL statement ERROR: (After commit) select * from test_commit; a | b @@ -725,7 +725,7 @@ end; call test_exception_commit_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_exception_commit_raise_commit() line 3 at SQL statement +PL/pgSQL function test_exception_commit_raise_commit() line 2 at SQL statement ERROR: (After commit) select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -755,7 +755,7 @@ end; call test_gg_1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_gg_1() line 3 at SQL statement +PL/pgSQL function test_gg_1() line 2 at SQL statement test_gg_1 ----------- @@ -789,7 +789,7 @@ end; call test_commit_exception(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception() line 3 at SQL statement +PL/pgSQL function test_commit_exception() line 2 at SQL statement test_commit_exception ----------------------- @@ -825,7 +825,7 @@ end; call test_commit2(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit2() line 3 at SQL statement +PL/pgSQL function test_commit2() line 2 at SQL statement test_commit2 -------------- @@ -860,7 +860,7 @@ end; call test_commit3(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit3() line 3 at SQL statement +PL/pgSQL function test_commit3() line 2 at SQL statement test_commit3 -------------- @@ -892,7 +892,7 @@ end; call test_rollback_with_exception(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback_with_exception() line 3 at SQL statement +PL/pgSQL function test_rollback_with_exception() line 2 at SQL statement test_rollback_with_exception ------------------------------ @@ -920,7 +920,7 @@ end; call test_nest_function_without_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_nest_function_without_commit() line 3 at SQL statement +PL/pgSQL function test_nest_function_without_commit() line 2 at SQL statement test_nest_function_without_commit ----------------------------------- @@ -949,7 +949,7 @@ end; call test_nest_function(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_nest_function() line 3 at SQL statement +PL/pgSQL function test_nest_function() line 2 at SQL statement test_nest_function -------------------- @@ -974,9 +974,9 @@ end; call test_nest_function1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit() line 3 at SQL statement +PL/pgSQL function test_commit() line 2 at SQL statement SQL statement "CALL test_commit()" -PL/pgSQL function test_nest_function1() line 3 at PERFORM +PL/pgSQL function test_nest_function1() line 2 at PERFORM test_nest_function1 --------------------- @@ -998,9 +998,9 @@ end; call test_nest_function2(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit() line 3 at SQL statement +PL/pgSQL function test_commit() line 2 at SQL statement SQL statement "CALL test_commit()" -PL/pgSQL function test_nest_function2() line 3 at PERFORM +PL/pgSQL function test_nest_function2() line 2 at PERFORM test_nest_function2 --------------------- @@ -1023,9 +1023,9 @@ end; call test_nest_function_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_without_commit() line 3 at SQL statement +PL/pgSQL function test_without_commit() line 2 at SQL statement SQL statement "CALL test_without_commit()" -PL/pgSQL function test_nest_function_rollback() line 3 at PERFORM +PL/pgSQL function test_nest_function_rollback() line 2 at PERFORM test_nest_function_rollback ----------------------------- @@ -1053,7 +1053,7 @@ ERROR: relation "tx" does not exist on datanode1 LINE 1: insert into tx select 3 ^ QUERY: insert into tx select 3 -CONTEXT: PL/pgSQL function test_nest_function_select() line 3 at SQL statement +CONTEXT: PL/pgSQL function test_nest_function_select() line 2 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1076,7 +1076,7 @@ ERROR: relation "tx" does not exist on datanode1 LINE 1: insert into tx select 3 ^ QUERY: insert into tx select 3 -CONTEXT: PL/pgSQL function test_nest_function_calll() line 3 at SQL statement +CONTEXT: PL/pgSQL function test_nest_function_calll() line 2 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1100,12 +1100,12 @@ end; call test_commit_exception_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception_commit() line 3 at SQL statement +PL/pgSQL function test_commit_exception_commit() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 3 ^ QUERY: insert into test_commit select 3 -CONTEXT: PL/pgSQL function test_commit_exception_commit() line 10 at SQL statement +CONTEXT: PL/pgSQL function test_commit_exception_commit() line 9 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1130,12 +1130,12 @@ end; call test_commit_exception_commit_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception_commit_commit() line 3 at SQL statement +PL/pgSQL function test_commit_exception_commit_commit() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 3 ^ QUERY: insert into test_commit select 3 -CONTEXT: PL/pgSQL function test_commit_exception_commit_commit() line 10 at SQL statement +CONTEXT: PL/pgSQL function test_commit_exception_commit_commit() line 9 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1160,12 +1160,12 @@ end; call test_commit_exception_commit_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception_commit_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_exception_commit_rollback() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 3 ^ QUERY: insert into test_commit select 3 -CONTEXT: PL/pgSQL function test_commit_exception_commit_rollback() line 10 at SQL statement +CONTEXT: PL/pgSQL function test_commit_exception_commit_rollback() line 9 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1185,12 +1185,12 @@ end; call test_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback() line 3 at SQL statement +PL/pgSQL function test_rollback() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 2 ^ QUERY: insert into test_commit select 2 -CONTEXT: PL/pgSQL function test_rollback() line 7 at SQL statement +CONTEXT: PL/pgSQL function test_rollback() line 6 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1396,10 +1396,10 @@ select FUNCTION_EXAMPLE1(); select * from FUNCTION_EXAMPLE1() where 1=1; ERROR: can not use commit rollback in Complex SQL -CONTEXT: PL/pgSQL function function_example1() line 6 at COMMIT +CONTEXT: PL/pgSQL function function_example1() line 5 at COMMIT update EXAMPLE1 set COL1=666 where COL1=2 and FUNCTION_EXAMPLE1(); ERROR: can not use commit rollback in Complex SQL -CONTEXT: PL/pgSQL function function_example1() line 6 at COMMIT +CONTEXT: PL/pgSQL function function_example1() line 5 at COMMIT select (select FUNCTION_EXAMPLE1()); function_example1 ------------------- @@ -1408,7 +1408,7 @@ select (select FUNCTION_EXAMPLE1()); select (select * from FUNCTION_EXAMPLE1() where 1=1); ERROR: can not use commit rollback in Complex SQL -CONTEXT: PL/pgSQL function function_example1() line 6 at COMMIT +CONTEXT: PL/pgSQL function function_example1() line 5 at COMMIT referenced column: function_example1 create or replace function func1() return void as diff --git a/src/test/regress/output/comment_proc.source b/src/test/regress/output/comment_proc.source index 71bd049fd2..97c28b7be2 100644 --- a/src/test/regress/output/comment_proc.source +++ b/src/test/regress/output/comment_proc.source @@ -61,8 +61,7 @@ END; / \sf comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -76,19 +75,18 @@ END; / \sf+ comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst2() AS @@ -106,8 +104,7 @@ END; / \sf comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -121,19 +118,18 @@ END; / \sf+ comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst3( ) AS @@ -151,8 +147,7 @@ END; / \sf comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -166,19 +161,18 @@ END; / \sf+ comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst4(/* a comment */) AS @@ -196,8 +190,7 @@ END; / \sf comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -211,19 +204,18 @@ END; / \sf+ comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst5(/* a comment */ ) @@ -243,8 +235,7 @@ END; \sf comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -259,19 +250,18 @@ END; \sf+ comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst6( /* a comment */) @@ -291,8 +281,7 @@ END; \sf comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -307,19 +296,18 @@ END; \sf+ comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst7( /* a comment */) @@ -339,8 +327,7 @@ END; \sf comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -355,19 +342,18 @@ END; \sf+ comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst8(--a comment ) @@ -387,8 +373,7 @@ END; \sf comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -403,19 +388,18 @@ END; \sf+ comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst9( --a comment @@ -437,8 +421,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -454,19 +437,18 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst10(a INTEGER) AS @@ -484,8 +466,7 @@ END; / \sf comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -499,19 +480,18 @@ END; / \sf+ comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst11(a INTEGER -- param a single line comment ) @@ -531,8 +511,7 @@ END; \sf comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -547,19 +526,18 @@ END; \sf+ comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst12(a INTEGER /* param a C comment */) AS @@ -577,8 +555,7 @@ END; / \sf comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -592,19 +569,18 @@ END; / \sf+ comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -626,8 +602,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -643,19 +618,18 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst14(a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ @@ -679,8 +653,7 @@ CREATE OR REPLACE PROCEDURE test_comment.comment_tst14(a INTEGER, -- param a sin b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -697,19 +670,18 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE /* xx */ OR /* xx */ REPLACE /* xx */ PROCEDURE /* xx */ comment_tst15 /* xx */ (a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ @@ -734,8 +706,7 @@ CREATE OR REPLACE PROCEDURE test_comment.comment_tst15(a INTEGER, -- param a sin b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -752,19 +723,18 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -788,8 +758,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments 1 +AS DECLARE --header comments 1 --header comments 2 --header comments 3 /* 1 mult-lines @@ -807,21 +776,20 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments 1 -3 --header comments 2 -4 --header comments 3 -5 /* 1 mult-lines -6 comments */ -7 v1 INTEGER := 0; --declare comments -8 /* 2 mult-lines -9 comments */ -10 --declare comments -11 BEGIN -12 /* C style in pl/sql source */ -13 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -14 END; -15 / +1 AS DECLARE --header comments 1 +2 --header comments 2 +3 --header comments 3 +4 /* 1 mult-lines +5 comments */ +6 v1 INTEGER := 0; --declare comments +7 /* 2 mult-lines +8 comments */ +9 --declare comments +10 BEGIN +11 /* C style in pl/sql source */ +12 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +13 END; +14 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -847,8 +815,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -868,23 +835,22 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +15 END; +16 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -914,8 +880,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -939,27 +904,26 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments 1 -9 --header comments 2 -10 --header comments 3 -11 /* 4 mult-lines -12 comments */ -13 v1 INTEGER := 0; --declare comments -14 /* 2 mult-lines -15 comments */ -16 --declare comments -17 BEGIN -18 /* C style in pl/sql source */ -19 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -20 END; -21 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments 1 +8 --header comments 2 +9 --header comments 3 +10 /* 4 mult-lines +11 comments */ +12 v1 INTEGER := 0; --declare comments +13 /* 2 mult-lines +14 comments */ +15 --declare comments +16 BEGIN +17 /* C style in pl/sql source */ +18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +19 END; +20 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -985,8 +949,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1006,23 +969,22 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -1048,8 +1010,7 @@ END; -- body end CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1069,23 +1030,22 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -1114,8 +1074,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1138,26 +1097,25 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ -16 end; -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ +15 end; +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -1186,8 +1144,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1210,26 +1167,25 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; -16 end; /* inner comment */ -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; +15 end; /* inner comment */ +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / CREATE OR REPLACE FUNCTION first_day_month_func_001 RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1249,8 +1205,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_001() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1267,19 +1222,18 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; CREATE OR REPLACE FUNCTION first_day_month_func_002() RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1299,8 +1253,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_002() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1317,19 +1270,18 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; CREATE OR REPLACE FUNCTION first_day_month_func_003( ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1347,8 +1299,7 @@ END; \sf first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1364,20 +1315,19 @@ END; \sf+ first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_004( /* function null param */ ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1395,8 +1345,7 @@ END; \sf first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1412,20 +1361,19 @@ END; \sf+ first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_005( /* function null param */ ) RETURN VARCHAR2 AS --header comments @@ -1445,8 +1393,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1463,20 +1410,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_006( /* function null param */ ) RETURN VARCHAR2 AS --header comments @@ -1496,8 +1442,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1514,20 +1459,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_007( /* function null param */ ) RETURN VARCHAR2 AS @@ -1549,8 +1493,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_007( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1568,20 +1511,19 @@ END; /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_008( -- function null param , single line comment ) RETURN VARCHAR2 AS --header comments @@ -1601,8 +1543,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1619,20 +1560,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_009( -- function null param , single line comment ) RETURN VARCHAR2 AS @@ -1654,8 +1594,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_009( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1673,20 +1612,19 @@ END; -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_010( i_date date ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1704,8 +1642,7 @@ END; \sf first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date date ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1721,20 +1658,19 @@ END; \sf+ first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date date ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_011( i_date date -- param a single line comment ) RETURN VARCHAR2 AS --header comments @@ -1754,8 +1690,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date date -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1772,20 +1707,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date date -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_012( i_date date /* param a C comment */ ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1803,8 +1737,7 @@ END; \sf first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date date /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1820,20 +1753,19 @@ END; \sf+ first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date date /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_013(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -1853,8 +1785,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_013(i_date IN DATE, msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -1870,18 +1801,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_014(i_date IN DATE, -- para1 comments msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN VARCHAR2 AS @@ -1901,8 +1831,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_014(i_date IN DATE, msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -1918,18 +1847,17 @@ END; msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR /*x1*/REPLACE /*x1*/ FUNCTION /*x1*/ first_day_month_func_015 /*x1*/ ( i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN /*x1*/ VARCHAR2 /*x1*/ AS @@ -1949,8 +1877,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_015( i_date IN DAT msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -1966,18 +1893,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_016(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -1999,8 +1925,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_016(i_date IN DATE, msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments1 +AS DECLARE --header comments1 --header comments2 --header comments3 /* 1 mult-lines @@ -2018,20 +1943,19 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments1 -3 --header comments2 -4 --header comments3 -5 /* 1 mult-lines -6 comments */ -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments1 +2 --header comments2 +3 --header comments3 +4 /* 1 mult-lines +5 comments */ +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_017(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2054,8 +1978,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_017(i_date IN DATE, msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments lb_date VARCHAR2(16); @@ -2071,18 +1994,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_018(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2106,8 +2028,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_018(i_date IN DATE, msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -2127,22 +2048,21 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments -9 lb_date VARCHAR2(16); -10 BEGIN -11 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -12 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -13 -14 RETURN lb_date; -15 END; -16 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments +8 lb_date VARCHAR2(16); +9 BEGIN +10 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +11 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +12 +13 RETURN lb_date; +14 END; +15 / CREATE OR REPLACE FUNCTION first_day_month_func_019(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2162,8 +2082,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_019(i_date IN DATE, msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -2179,18 +2098,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_020(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2210,8 +2128,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_020(i_date IN DATE, msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -2227,19 +2144,18 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / -\! @abs_bindir@/gs_dump -f @abs_bindir@/test_comment.tar -c -n test_comment -p @portstring@ test_comment -F t >>/dev/null +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / +\! /data/pengjiong/openGauss-server/src/test/regress/./tmp_check/install//data/pengjiong/openGauss-server/dest/bin/gs_dump -f /data/pengjiong/openGauss-server/src/test/regress/./tmp_check/install//data/pengjiong/openGauss-server/dest/bin/test_comment.tar -c -n test_comment -p 11222 test_comment -F t >>/dev/null drop database if exists test_comment1; NOTICE: database "test_comment1" does not exist, skipping create database test_comment1; @@ -2277,8 +2193,7 @@ $function$; 9 $function$; \sf comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2292,23 +2207,21 @@ END; / \sf+ comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2322,23 +2235,21 @@ END; / \sf+ comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2352,23 +2263,21 @@ END; / \sf+ comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2382,24 +2291,22 @@ END; / \sf+ comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2414,24 +2321,22 @@ END; \sf+ comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2446,24 +2351,22 @@ END; \sf+ comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2478,24 +2381,22 @@ END; \sf+ comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2510,25 +2411,23 @@ END; \sf+ comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst9 CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2544,23 +2443,21 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2574,24 +2471,22 @@ END; / \sf+ comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / \sf comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2606,23 +2501,21 @@ END; \sf+ comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / \sf comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2636,25 +2529,23 @@ END; / \sf+ comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / \sf comment_tst13 CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2670,26 +2561,24 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / \sf comment_tst14 CREATE OR REPLACE PROCEDURE test_comment.comment_tst14(a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2706,26 +2595,24 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / \sf comment_tst15 CREATE OR REPLACE PROCEDURE test_comment.comment_tst15(a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2742,25 +2629,23 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / \sf comment_tst16 CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments 1 +AS DECLARE --header comments 1 --header comments 2 --header comments 3 /* 1 mult-lines @@ -2778,27 +2663,25 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments 1 -3 --header comments 2 -4 --header comments 3 -5 /* 1 mult-lines -6 comments */ -7 v1 INTEGER := 0; --declare comments -8 /* 2 mult-lines -9 comments */ -10 --declare comments -11 BEGIN -12 /* C style in pl/sql source */ -13 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -14 END; -15 / +1 AS DECLARE --header comments 1 +2 --header comments 2 +3 --header comments 3 +4 /* 1 mult-lines +5 comments */ +6 v1 INTEGER := 0; --declare comments +7 /* 2 mult-lines +8 comments */ +9 --declare comments +10 BEGIN +11 /* C style in pl/sql source */ +12 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +13 END; +14 / \sf comment_tst17 CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2818,29 +2701,27 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +15 END; +16 / \sf comment_tst18 CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -2864,33 +2745,31 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments 1 -9 --header comments 2 -10 --header comments 3 -11 /* 4 mult-lines -12 comments */ -13 v1 INTEGER := 0; --declare comments -14 /* 2 mult-lines -15 comments */ -16 --declare comments -17 BEGIN -18 /* C style in pl/sql source */ -19 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -20 END; -21 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments 1 +8 --header comments 2 +9 --header comments 3 +10 /* 4 mult-lines +11 comments */ +12 v1 INTEGER := 0; --declare comments +13 /* 2 mult-lines +14 comments */ +15 --declare comments +16 BEGIN +17 /* C style in pl/sql source */ +18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +19 END; +20 / \sf comment_tst19 CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2910,29 +2789,27 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / \sf comment_tst20 CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2952,29 +2829,27 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / \sf comment_tst21 CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2997,32 +2872,30 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ -16 end; -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ +15 end; +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / \sf comment_tst22 CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -3045,33 +2918,31 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; -16 end; /* inner comment */ -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; +15 end; /* inner comment */ +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / \sf first_day_month_func_001 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_001() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3088,26 +2959,24 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; \sf first_day_month_func_002 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_002() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3124,24 +2993,22 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; \sf first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3157,25 +3024,23 @@ END; \sf+ first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3191,26 +3056,24 @@ END; \sf+ first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_005 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3227,26 +3090,24 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_006 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3263,27 +3124,25 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_007 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_007( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3301,26 +3160,24 @@ END; /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_008 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3337,27 +3194,25 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_009 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_009( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3375,25 +3230,23 @@ END; -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date date ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3409,26 +3262,24 @@ END; \sf+ first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date date ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_011 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date date -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3445,25 +3296,23 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date date -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date date /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3479,27 +3328,25 @@ END; \sf+ first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date date /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_013 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_013(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3515,25 +3362,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_014 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_014(i_date IN DATE, -- para1 comments msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3549,25 +3394,23 @@ END; msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_015 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_015( i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3583,25 +3426,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_016 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_016(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments1 +AS DECLARE --header comments1 --header comments2 --header comments3 /* 1 mult-lines @@ -3619,27 +3460,25 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments1 -3 --header comments2 -4 --header comments3 -5 /* 1 mult-lines -6 comments */ -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments1 +2 --header comments2 +3 --header comments3 +4 /* 1 mult-lines +5 comments */ +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_017 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_017(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments lb_date VARCHAR2(16); @@ -3655,25 +3494,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_018 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_018(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -3693,29 +3530,27 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments -9 lb_date VARCHAR2(16); -10 BEGIN -11 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -12 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -13 -14 RETURN lb_date; -15 END; -16 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments +8 lb_date VARCHAR2(16); +9 BEGIN +10 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +11 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +12 +13 RETURN lb_date; +14 END; +15 / \sf first_day_month_func_019 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_019(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3731,25 +3566,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_020 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_020(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3765,15 +3598,14 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / diff --git a/src/test/regress/output/comment_proc_1.source b/src/test/regress/output/comment_proc_1.source index c549f35584..e0a2193f72 100644 --- a/src/test/regress/output/comment_proc_1.source +++ b/src/test/regress/output/comment_proc_1.source @@ -61,8 +61,7 @@ END; / \sf comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -76,19 +75,18 @@ END; / \sf+ comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst2() AS @@ -106,8 +104,7 @@ END; / \sf comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -121,19 +118,18 @@ END; / \sf+ comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst3( ) AS @@ -151,8 +147,7 @@ END; / \sf comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -166,19 +161,18 @@ END; / \sf+ comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst4(/* a comment */) AS @@ -196,8 +190,7 @@ END; / \sf comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -211,19 +204,18 @@ END; / \sf+ comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst5(/* a comment */ ) @@ -243,8 +235,7 @@ END; \sf comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -259,19 +250,18 @@ END; \sf+ comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst6( /* a comment */) @@ -291,8 +281,7 @@ END; \sf comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -307,19 +296,18 @@ END; \sf+ comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst7( /* a comment */) @@ -339,8 +327,7 @@ END; \sf comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -355,19 +342,18 @@ END; \sf+ comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst8(--a comment ) @@ -387,8 +373,7 @@ END; \sf comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -403,19 +388,18 @@ END; \sf+ comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst9( --a comment @@ -437,8 +421,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -454,19 +437,18 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst10(a INTEGER) AS @@ -484,8 +466,7 @@ END; / \sf comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -499,19 +480,18 @@ END; / \sf+ comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst11(a INTEGER -- param a single line comment ) @@ -531,8 +511,7 @@ END; \sf comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -547,19 +526,18 @@ END; \sf+ comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst12(a INTEGER /* param a C comment */) AS @@ -577,8 +555,7 @@ END; / \sf comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -592,19 +569,18 @@ END; / \sf+ comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -626,8 +602,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -643,19 +618,18 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst14(a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ @@ -679,8 +653,7 @@ CREATE OR REPLACE PROCEDURE test_comment.comment_tst14(a INTEGER, -- param a sin b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -697,19 +670,18 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE /* xx */ OR /* xx */ REPLACE /* xx */ PROCEDURE /* xx */ comment_tst15 /* xx */ (a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ @@ -734,8 +706,7 @@ CREATE OR REPLACE PROCEDURE test_comment.comment_tst15(a INTEGER, -- param a sin b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -752,19 +723,18 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -788,8 +758,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments 1 +AS DECLARE --header comments 1 --header comments 2 --header comments 3 /* 1 mult-lines @@ -807,21 +776,20 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments 1 -3 --header comments 2 -4 --header comments 3 -5 /* 1 mult-lines -6 comments */ -7 v1 INTEGER := 0; --declare comments -8 /* 2 mult-lines -9 comments */ -10 --declare comments -11 BEGIN -12 /* C style in pl/sql source */ -13 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -14 END; -15 / +1 AS DECLARE --header comments 1 +2 --header comments 2 +3 --header comments 3 +4 /* 1 mult-lines +5 comments */ +6 v1 INTEGER := 0; --declare comments +7 /* 2 mult-lines +8 comments */ +9 --declare comments +10 BEGIN +11 /* C style in pl/sql source */ +12 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +13 END; +14 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -847,8 +815,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -868,23 +835,22 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +15 END; +16 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -914,8 +880,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -939,27 +904,26 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments 1 -9 --header comments 2 -10 --header comments 3 -11 /* 4 mult-lines -12 comments */ -13 v1 INTEGER := 0; --declare comments -14 /* 2 mult-lines -15 comments */ -16 --declare comments -17 BEGIN -18 /* C style in pl/sql source */ -19 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -20 END; -21 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments 1 +8 --header comments 2 +9 --header comments 3 +10 /* 4 mult-lines +11 comments */ +12 v1 INTEGER := 0; --declare comments +13 /* 2 mult-lines +14 comments */ +15 --declare comments +16 BEGIN +17 /* C style in pl/sql source */ +18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +19 END; +20 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -985,8 +949,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1006,23 +969,22 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -1048,8 +1010,7 @@ END; -- body end CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1069,23 +1030,22 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -1114,8 +1074,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1138,26 +1097,25 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ -16 end; -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ +15 end; +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / /* The PL/SQL source comments before define. */ CREATE OR REPLACE PROCEDURE comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ @@ -1186,8 +1144,7 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -1210,26 +1167,25 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; -16 end; /* inner comment */ -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; +15 end; /* inner comment */ +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / CREATE OR REPLACE FUNCTION first_day_month_func_001 RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1249,8 +1205,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_001() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1267,19 +1222,18 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; CREATE OR REPLACE FUNCTION first_day_month_func_002() RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1299,8 +1253,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_002() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1317,19 +1270,18 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; CREATE OR REPLACE FUNCTION first_day_month_func_003( ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1347,8 +1299,7 @@ END; \sf first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1364,20 +1315,19 @@ END; \sf+ first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_004( /* function null param */ ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1395,8 +1345,7 @@ END; \sf first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1412,20 +1361,19 @@ END; \sf+ first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_005( /* function null param */ ) RETURN VARCHAR2 AS --header comments @@ -1445,8 +1393,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1463,20 +1410,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_006( /* function null param */ ) RETURN VARCHAR2 AS --header comments @@ -1496,8 +1442,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1514,20 +1459,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_007( /* function null param */ ) RETURN VARCHAR2 AS @@ -1549,8 +1493,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_007( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1568,20 +1511,19 @@ END; /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_008( -- function null param , single line comment ) RETURN VARCHAR2 AS --header comments @@ -1601,8 +1543,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1619,20 +1560,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_009( -- function null param , single line comment ) RETURN VARCHAR2 AS @@ -1654,8 +1594,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_009( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1673,20 +1612,19 @@ END; -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_010( i_date date ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1704,8 +1642,7 @@ END; \sf first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date timestamp without time zone ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1721,20 +1658,19 @@ END; \sf+ first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date timestamp without time zone ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_011( i_date date -- param a single line comment ) RETURN VARCHAR2 AS --header comments @@ -1754,8 +1690,7 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date timestamp without time zone -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1772,20 +1707,19 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date timestamp without time zone -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_012( i_date date /* param a C comment */ ) RETURN VARCHAR2 AS --header comments /* 1 mult-lines @@ -1803,8 +1737,7 @@ END; \sf first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date timestamp without time zone /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -1820,20 +1753,19 @@ END; \sf+ first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date timestamp without time zone /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_013(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -1853,8 +1785,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_013(i_date IN times msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -1870,18 +1801,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_014(i_date IN DATE, -- para1 comments msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN VARCHAR2 AS @@ -1901,8 +1831,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_014(i_date IN times msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -1918,18 +1847,17 @@ END; msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR /*x1*/REPLACE /*x1*/ FUNCTION /*x1*/ first_day_month_func_015 /*x1*/ ( i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN /*x1*/ VARCHAR2 /*x1*/ AS @@ -1949,8 +1877,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_015( i_date IN tim msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -1966,18 +1893,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_016(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -1999,8 +1925,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_016(i_date IN times msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments1 +AS DECLARE --header comments1 --header comments2 --header comments3 /* 1 mult-lines @@ -2018,20 +1943,19 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments1 -3 --header comments2 -4 --header comments3 -5 /* 1 mult-lines -6 comments */ -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments1 +2 --header comments2 +3 --header comments3 +4 /* 1 mult-lines +5 comments */ +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +10 +11 RETURN lb_date; +12 END; +13 / CREATE OR REPLACE FUNCTION first_day_month_func_017(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2054,8 +1978,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_017(i_date IN times msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments lb_date VARCHAR2(16); @@ -2071,18 +1994,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_018(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2106,8 +2028,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_018(i_date IN times msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -2127,22 +2048,21 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments -9 lb_date VARCHAR2(16); -10 BEGIN -11 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -12 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -13 -14 RETURN lb_date; -15 END; -16 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments +8 lb_date VARCHAR2(16); +9 BEGIN +10 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +11 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +12 +13 RETURN lb_date; +14 END; +15 / CREATE OR REPLACE FUNCTION first_day_month_func_019(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2162,8 +2082,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_019(i_date IN times msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -2179,18 +2098,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / CREATE OR REPLACE FUNCTION first_day_month_func_020(i_date IN DATE, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN VARCHAR2 AS @@ -2210,8 +2128,7 @@ CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_020(i_date IN times msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -2227,18 +2144,17 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \! @abs_bindir@/gs_dump -f @abs_bindir@/test_comment.tar -c -n test_comment -p @portstring@ test_comment -F t >>/dev/null drop database if exists test_comment1; NOTICE: database "test_comment1" does not exist, skipping @@ -2277,8 +2193,7 @@ $function$; 9 $function$; \sf comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2292,23 +2207,21 @@ END; / \sf+ comment_tst1 CREATE OR REPLACE PROCEDURE test_comment.comment_tst1() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2322,23 +2235,21 @@ END; / \sf+ comment_tst2 CREATE OR REPLACE PROCEDURE test_comment.comment_tst2() -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2352,23 +2263,21 @@ END; / \sf+ comment_tst3 CREATE OR REPLACE PROCEDURE test_comment.comment_tst3( ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2382,24 +2291,22 @@ END; / \sf+ comment_tst4 CREATE OR REPLACE PROCEDURE test_comment.comment_tst4(/* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2414,24 +2321,22 @@ END; \sf+ comment_tst5 CREATE OR REPLACE PROCEDURE test_comment.comment_tst5(/* a comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2446,24 +2351,22 @@ END; \sf+ comment_tst6 CREATE OR REPLACE PROCEDURE test_comment.comment_tst6( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2478,24 +2381,22 @@ END; \sf+ comment_tst7 CREATE OR REPLACE PROCEDURE test_comment.comment_tst7( /* a comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2510,25 +2411,23 @@ END; \sf+ comment_tst8 CREATE OR REPLACE PROCEDURE test_comment.comment_tst8(--a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst9 CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2544,23 +2443,21 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst9( --a comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_',v1; -- line comment in body +11 END; +12 / \sf comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2574,24 +2471,22 @@ END; / \sf+ comment_tst10 CREATE OR REPLACE PROCEDURE test_comment.comment_tst10(a INTEGER) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / \sf comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2606,23 +2501,21 @@ END; \sf+ comment_tst11 CREATE OR REPLACE PROCEDURE test_comment.comment_tst11(a INTEGER -- param a single line comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / \sf comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2636,25 +2529,23 @@ END; / \sf+ comment_tst12 CREATE OR REPLACE PROCEDURE test_comment.comment_tst12(a INTEGER /* param a C comment */) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%',v1,a; -- line comment in body +11 END; +12 / \sf comment_tst13 CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2670,26 +2561,24 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst13(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / \sf comment_tst14 CREATE OR REPLACE PROCEDURE test_comment.comment_tst14(a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2706,26 +2595,24 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / \sf comment_tst15 CREATE OR REPLACE PROCEDURE test_comment.comment_tst15(a INTEGER, -- param a single line comment b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ v1 INTEGER := 0; --declare comments @@ -2742,25 +2629,23 @@ END; b INTEGER, /* param a C comment */ c INTEGER -- last param c C comment ) -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 v1 INTEGER := 0; --declare comments -6 /* 2 mult-lines -7 comments */ -8 --declare comments -9 BEGIN -10 /* C style in pl/sql source */ -11 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -12 END; -13 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 v1 INTEGER := 0; --declare comments +5 /* 2 mult-lines +6 comments */ +7 --declare comments +8 BEGIN +9 /* C style in pl/sql source */ +10 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +11 END; +12 / \sf comment_tst16 CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE ---header comments 1 +AS DECLARE --header comments 1 --header comments 2 --header comments 3 /* 1 mult-lines @@ -2778,27 +2663,25 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst16(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 --header comments 1 -3 --header comments 2 -4 --header comments 3 -5 /* 1 mult-lines -6 comments */ -7 v1 INTEGER := 0; --declare comments -8 /* 2 mult-lines -9 comments */ -10 --declare comments -11 BEGIN -12 /* C style in pl/sql source */ -13 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -14 END; -15 / +1 AS DECLARE --header comments 1 +2 --header comments 2 +3 --header comments 3 +4 /* 1 mult-lines +5 comments */ +6 v1 INTEGER := 0; --declare comments +7 /* 2 mult-lines +8 comments */ +9 --declare comments +10 BEGIN +11 /* C style in pl/sql source */ +12 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +13 END; +14 / \sf comment_tst17 CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2818,29 +2701,27 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst17(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +15 END; +16 / \sf comment_tst18 CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -2864,33 +2745,31 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst18(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments 1 -9 --header comments 2 -10 --header comments 3 -11 /* 4 mult-lines -12 comments */ -13 v1 INTEGER := 0; --declare comments -14 /* 2 mult-lines -15 comments */ -16 --declare comments -17 BEGIN -18 /* C style in pl/sql source */ -19 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body -20 END; -21 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments 1 +8 --header comments 2 +9 --header comments 3 +10 /* 4 mult-lines +11 comments */ +12 v1 INTEGER := 0; --declare comments +13 /* 2 mult-lines +14 comments */ +15 --declare comments +16 BEGIN +17 /* C style in pl/sql source */ +18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -- line comment in body +19 END; +20 / \sf comment_tst19 CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2910,29 +2789,27 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst19(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / \sf comment_tst20 CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2952,29 +2829,27 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst20(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 /* C style in pl/sql source */ -15 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -16 END; -17 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 /* C style in pl/sql source */ +14 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +15 END; +16 / \sf comment_tst21 CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -2997,32 +2872,30 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst21(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ -16 end; -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c;/* inner comment */ +15 end; +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / \sf comment_tst22 CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments 1 --header comments 2 @@ -3045,33 +2918,31 @@ END; CREATE OR REPLACE PROCEDURE test_comment.comment_tst22(a INTEGER, /* param a C comment */ b INTEGER, -- param b single line comment c INTEGER /* last param c C comment */ ) -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments 1 -5 --header comments 2 -6 --header comments 3 -7 /* 2 mult-lines -8 comments */ -9 v1 INTEGER := 0; --declare comments -10 /* 2 mult-lines -11 comments */ -12 --declare comments -13 BEGIN -14 begin -15 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; -16 end; /* inner comment */ -17 /* C style in pl/sql source */ -18 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; -19 END; -20 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments 1 +4 --header comments 2 +5 --header comments 3 +6 /* 2 mult-lines +7 comments */ +8 v1 INTEGER := 0; --declare comments +9 /* 2 mult-lines +10 comments */ +11 --declare comments +12 BEGIN +13 begin +14 RAISE NOTICE 'inner Emp Id: %_%_%_%',v1,a,b,c; +15 end; /* inner comment */ +16 /* C style in pl/sql source */ +17 RAISE NOTICE 'Emp Id: %_%_%_%',v1,a,b,c; +18 END; +19 / \sf first_day_month_func_001 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_001() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3088,26 +2959,24 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; \sf first_day_month_func_002 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_002() RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -AS $function$ DECLARE ---header comments +AS $function$ DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3124,24 +2993,22 @@ END$function$; RETURNS character varying LANGUAGE plpgsql NOT FENCED NOT SHIPPABLE -1 AS $function$ DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END$function$; +1 AS $function$ DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END$function$; \sf first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3157,25 +3024,23 @@ END; \sf+ first_day_month_func_003 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_003( ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3191,26 +3056,24 @@ END; \sf+ first_day_month_func_004 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_004( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_005 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3227,26 +3090,24 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_005( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_006 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3263,27 +3124,25 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_006( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_007 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_007( /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3301,26 +3160,24 @@ END; /* function null param */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_008 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3337,27 +3194,25 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_008( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_009 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_009( -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3375,25 +3230,23 @@ END; -- function null param , single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date timestamp without time zone ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3409,26 +3262,24 @@ END; \sf+ first_day_month_func_010 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_010( i_date timestamp without time zone ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_011 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date timestamp without time zone -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3445,25 +3296,23 @@ END; CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_011( i_date timestamp without time zone -- param a single line comment ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date timestamp without time zone /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ i_date date := now(); @@ -3479,27 +3328,25 @@ END; \sf+ first_day_month_func_012 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_012( i_date timestamp without time zone /* param a C comment */ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 i_date date := now(); -6 msg VARCHAR2 := 'default msg'; -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%',msg,lb_date; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 i_date date := now(); +5 msg VARCHAR2 := 'default msg'; +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%',msg,lb_date; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_013 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_013(i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3515,25 +3362,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_014 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_014(i_date IN timestamp without time zone, -- para1 comments msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3549,25 +3394,23 @@ END; msg VARCHAR2, /* param2 comments */msg1 VARCHAR2 -- param3 comments ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_015 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_015( i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3583,25 +3426,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_016 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_016(i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments1 +AS DECLARE --header comments1 --header comments2 --header comments3 /* 1 mult-lines @@ -3619,27 +3460,25 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments1 -3 --header comments2 -4 --header comments3 -5 /* 1 mult-lines -6 comments */ -7 lb_date VARCHAR2(16); -8 BEGIN -9 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -10 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -11 -12 RETURN lb_date; -13 END; -14 / +1 AS DECLARE --header comments1 +2 --header comments2 +3 --header comments3 +4 /* 1 mult-lines +5 comments */ +6 lb_date VARCHAR2(16); +7 BEGIN +8 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +9 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +10 +11 RETURN lb_date; +12 END; +13 / \sf first_day_month_func_017 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_017(i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ --header comments lb_date VARCHAR2(16); @@ -3655,25 +3494,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 --header comments -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 --header comments +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_018 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_018(i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE -/* 1 mult-lines +AS DECLARE /* 1 mult-lines comments */ /* 2 mult-lines comments */ @@ -3693,29 +3530,27 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 /* 1 mult-lines -3 comments */ -4 /* 2 mult-lines -5 comments */ -6 /* 3 mult-lines -7 comments */ -8 --header comments -9 lb_date VARCHAR2(16); -10 BEGIN -11 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -12 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -13 -14 RETURN lb_date; -15 END; -16 / +1 AS DECLARE /* 1 mult-lines +2 comments */ +3 /* 2 mult-lines +4 comments */ +5 /* 3 mult-lines +6 comments */ +7 --header comments +8 lb_date VARCHAR2(16); +9 BEGIN +10 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +11 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +12 +13 RETURN lb_date; +14 END; +15 / \sf first_day_month_func_019 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_019(i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3731,25 +3566,23 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / \sf first_day_month_func_020 CREATE OR REPLACE FUNCTION test_comment.first_day_month_func_020(i_date IN timestamp without time zone, /*para1 comments*/msg VARCHAR2, -- param2 comments msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -AS DECLARE ---header comments +AS DECLARE --header comments /* 1 mult-lines comments */ lb_date VARCHAR2(16); @@ -3765,15 +3598,14 @@ END; msg1 VARCHAR2 /*param3 comments*/ ) RETURN character varying NOT FENCED NOT SHIPPABLE -1 AS DECLARE -2 --header comments -3 /* 1 mult-lines -4 comments */ -5 lb_date VARCHAR2(16); -6 BEGIN -7 lb_date := TO_CHAR(i_date, 'yyyymmdd'); -8 RAISE NOTICE '%_%_%',msg,lb_date,msg1; -9 -10 RETURN lb_date; -11 END; -12 / +1 AS DECLARE --header comments +2 /* 1 mult-lines +3 comments */ +4 lb_date VARCHAR2(16); +5 BEGIN +6 lb_date := TO_CHAR(i_date, 'yyyymmdd'); +7 RAISE NOTICE '%_%_%',msg,lb_date,msg1; +8 +9 RETURN lb_date; +10 END; +11 / diff --git a/src/test/regress/output/mysql_delimiter_fix.source b/src/test/regress/output/mysql_delimiter_fix.source index ade2c35f29..2d23060ca6 100644 --- a/src/test/regress/output/mysql_delimiter_fix.source +++ b/src/test/regress/output/mysql_delimiter_fix.source @@ -19,10 +19,9 @@ h_data varchar(24)); end; / ERROR: syntax error at or near ";" -LINE 15: ; +LINE 14: ; ^ -QUERY: -declare +QUERY: declare count_num int; f_count_num int; begin @@ -88,10 +87,10 @@ end; call pro_exp_001_2(); NOTICE: table "f_pro_exp_001_1" does not exist, skipping CONTEXT: SQL statement "drop table if exists f_pro_exp_001_1" -PL/pgSQL function pro_exp_001_2() line 6 at SQL statement +PL/pgSQL function pro_exp_001_2() line 5 at SQL statement NOTICE: table "fto_pro_exp_001_1" does not exist, skipping CONTEXT: SQL statement "drop table if exists fto_pro_exp_001_1" -PL/pgSQL function pro_exp_001_2() line 32 at SQL statement +PL/pgSQL function pro_exp_001_2() line 31 at SQL statement pro_exp_001_2 --------------- @@ -156,10 +155,10 @@ end; call pro_exp_001_1(); NOTICE: table "f_pro_exp_001_1" does not exist, skipping CONTEXT: SQL statement "drop table if exists f_pro_exp_001_1" -PL/pgSQL function pro_exp_001_1() line 6 at SQL statement +PL/pgSQL function pro_exp_001_1() line 5 at SQL statement NOTICE: table "fto_pro_exp_001_1" does not exist, skipping CONTEXT: SQL statement "drop table if exists fto_pro_exp_001_1" -PL/pgSQL function pro_exp_001_1() line 32 at SQL statement +PL/pgSQL function pro_exp_001_1() line 31 at SQL statement pro_exp_001_1 --------------- diff --git a/src/test/regress/output/mysql_function.source b/src/test/regress/output/mysql_function.source index 4e72939332..f2b81daa73 100755 --- a/src/test/regress/output/mysql_function.source +++ b/src/test/regress/output/mysql_function.source @@ -60,8 +60,7 @@ CREATE DEFINER = testusr1 FUNCTION public.func_definer1(integer, integer) AS $function$select $1 + $2;$function$; \sf proc_definer1 CREATE DEFINER = testusr1 PROCEDURE public.proc_definer1() -AS DECLARE -BEGIN +AS DECLARE BEGIN raise info 'create definer procedure.'; END; / @@ -123,8 +122,7 @@ CREATE DATABASE mysqltestbak DBCOMPATIBILITY 'B'; \c mysqltestbak \sf proc_definer1 CREATE DEFINER = testusr1 PROCEDURE public.proc_definer1() -AS DECLARE -BEGIN +AS DECLARE BEGIN raise info 'create definer procedure.'; END; / diff --git a/src/test/regress/output/plpgsql_reset_session.source b/src/test/regress/output/plpgsql_reset_session.source index a242fce4a2..c7e7a62dfb 100644 --- a/src/test/regress/output/plpgsql_reset_session.source +++ b/src/test/regress/output/plpgsql_reset_session.source @@ -85,28 +85,28 @@ end; \! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call proc094();"; INFO: c1.first is f CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1.last is true CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1.first.next t CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1.last.prior t CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1.first.prior CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1.last.next CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1(c1.first) is Thu Jan 06 11:22:33.234657 2022,c1(c1.last) is Thu Jan 06 12:02:44.123456 2022,c1(c1.next(c1.first)) is Thu Jan 06 09:36:45.123456 2022 CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: c1 is {"Thu Jan 06 11:22:33.234657 2022","Thu Jan 06 09:36:45.123456 2022","Thu Jan 06 12:02:44.123456 2022"} CONTEXT: SQL statement "CALL pkg094.p1(v1)" -PL/pgSQL function proc094() line 9 at PERFORM +PL/pgSQL function proc094() line 8 at PERFORM INFO: v1 is {"Thu Jan 06 11:22:33.234657 2022","Thu Jan 06 09:36:45.123456 2022","Thu Jan 06 12:02:44.123456 2022"} INFO: v1.first is f INFO: v1.last is true @@ -173,24 +173,24 @@ end pkg096; call pkg096.p2(); INFO: c1 is {123455,ABCDEF,012345} CONTEXT: SQL statement "CALL p3(c1=>c1)" -PL/pgSQL function public.p1(_blob[],_blob[]) line 3 at PERFORM +PL/pgSQL function public.p1(_blob[],_blob[]) line 2 at PERFORM SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c1 is {123455,ABCDEF,012345} CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c1.first is JIEsubst,c1.last is pingJIEsubstr,c1.first.next is pingJ CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c1(c1.first) is 012345,c1(c1.last) is 123455,c1(c1.first.next) is ABCDEF CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c2 is {123455,ABCDEF,012345,678910} CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c2.first is 13,c2.last is pingJIEsubstr,c2.first.next is JIEsubst,c2.count is 4 CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: r1 is {123455,ABCDEF,012345} INFO: r2 is {123455,ABCDEF,012345,678910} p2 @@ -201,24 +201,24 @@ INFO: r2 is {123455,ABCDEF,012345,678910} \! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call pkg096.p2();"; INFO: c1 is {123455,ABCDEF,012345} CONTEXT: SQL statement "CALL p3(c1=>c1)" -PL/pgSQL function public.p1(_blob[],_blob[]) line 3 at PERFORM +PL/pgSQL function public.p1(_blob[],_blob[]) line 2 at PERFORM SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c1 is {123455,ABCDEF,012345} CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c1.first is JIEsubst,c1.last is pingJIEsubstr,c1.first.next is pingJ CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c1(c1.first) is 012345,c1(c1.last) is 123455,c1(c1.first.next) is ABCDEF CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c2 is {123455,ABCDEF,012345,678910} CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: c2.first is 13,c2.last is pingJIEsubstr,c2.first.next is JIEsubst,c2.count is 4 CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" -PL/pgSQL function p2() line 10 at PERFORM +PL/pgSQL function p2() line 9 at PERFORM INFO: r1 is {123455,ABCDEF,012345} INFO: r2 is {123455,ABCDEF,012345,678910} p2 diff --git a/src/test/regress/output/pri_create_any_function.source b/src/test/regress/output/pri_create_any_function.source index edb1787e04..33e15bb104 100644 --- a/src/test/regress/output/pri_create_any_function.source +++ b/src/test/regress/output/pri_create_any_function.source @@ -138,7 +138,7 @@ call pri_fun_schema.pri_autonomous_1(); ERROR: permission denied for relation creditcard_info DETAIL: N/A CONTEXT: SQL statement "insert into pri_fun_schema.creditcard_info values(66, 66,66)" -PL/pgSQL function pri_autonomous_1() line 3 at SQL statement +PL/pgSQL function pri_autonomous_1() line 2 at SQL statement -- CREATE TABLE in procedure create or replace procedure pri_fun_schema.pri_test_proc_create(i in integer) as @@ -150,7 +150,7 @@ select pri_fun_schema.pri_test_proc_create(1); ERROR: permission denied for schema pri_fun_schema DETAIL: N/A CONTEXT: SQL statement "create table pri_fun_schema.pri_t11(id int) tablespace pri_create_fun_tsp" -PL/pgSQL function pri_test_proc_create(integer) line 3 at SQL statement +PL/pgSQL function pri_test_proc_create(integer) line 2 at SQL statement referenced column: pri_test_proc_create reset role; --删除函数。 diff --git a/src/test/regress/output/pri_execute_any_function.source b/src/test/regress/output/pri_execute_any_function.source index 00bf661c1d..1558118800 100644 --- a/src/test/regress/output/pri_execute_any_function.source +++ b/src/test/regress/output/pri_execute_any_function.source @@ -178,12 +178,12 @@ call exe_fun_schema.pri_autonomous_1(); ERROR: permission denied for relation creditcard_info DETAIL: N/A CONTEXT: SQL statement "insert into exe_fun_schema.creditcard_info values(66, 66,66)" -PL/pgSQL function pri_autonomous_1() line 3 at SQL statement +PL/pgSQL function pri_autonomous_1() line 2 at SQL statement select exe_fun_schema.pri_test_proc_create(1); ERROR: permission denied for schema exe_fun_schema DETAIL: N/A CONTEXT: SQL statement "create table exe_fun_schema.pri_t11(id int) tablespace pri_execute_fun_tsp" -PL/pgSQL function pri_test_proc_create(integer) line 3 at SQL statement +PL/pgSQL function pri_test_proc_create(integer) line 2 at SQL statement referenced column: pri_test_proc_create DROP PROCEDURE exe_fun_schema.prc_add(INTEGER,INTEGER); ERROR: permission denied for function exe_fun_schema.prc_add diff --git a/src/test/regress/output/select_into_user_defined_variables.source b/src/test/regress/output/select_into_user_defined_variables.source index 347ddc72be..1af115254f 100644 --- a/src/test/regress/output/select_into_user_defined_variables.source +++ b/src/test/regress/output/select_into_user_defined_variables.source @@ -257,7 +257,7 @@ end; call outer_pro(10); NOTICE: table "tb1" does not exist, skipping CONTEXT: SQL statement "drop table if exists tb1" -PL/pgSQL function outer_pro(integer) line 4 at SQL statement +PL/pgSQL function outer_pro(integer) line 3 at SQL statement outer_pro ----------- diff --git a/src/test/regress/output/single_node_produce_commit_rollback.source b/src/test/regress/output/single_node_produce_commit_rollback.source index 9c7a122e9e..f6ef2a3340 100644 --- a/src/test/regress/output/single_node_produce_commit_rollback.source +++ b/src/test/regress/output/single_node_produce_commit_rollback.source @@ -9,7 +9,7 @@ end; call test_without_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_without_commit() line 3 at SQL statement +PL/pgSQL function test_without_commit() line 2 at SQL statement test_without_commit --------------------- @@ -57,7 +57,7 @@ end; call test_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit() line 3 at SQL statement +PL/pgSQL function test_commit() line 2 at SQL statement test_commit ------------- @@ -83,7 +83,7 @@ end; call test_commit_insert_option(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_option() line 3 at SQL statement +PL/pgSQL function test_commit_insert_option() line 2 at SQL statement test_commit_insert_option --------------------------- @@ -110,7 +110,7 @@ end; call test_commit_insert_delete(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete() line 2 at SQL statement test_commit_insert_delete --------------------------- @@ -136,7 +136,7 @@ end; call test_commit_insert_update(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update() line 2 at SQL statement test_commit_insert_update --------------------------- @@ -163,7 +163,7 @@ end; call test_commit_insert_update_delete(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_delete() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_delete() line 2 at SQL statement test_commit_insert_update_delete ---------------------------------- @@ -190,7 +190,7 @@ end; call test_commit_insert_delete_update(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_update() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_update() line 2 at SQL statement test_commit_insert_delete_update ---------------------------------- @@ -217,7 +217,7 @@ end; call test_commit_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_commit() line 3 at SQL statement +PL/pgSQL function test_commit_commit() line 2 at SQL statement test_commit_commit -------------------- @@ -247,7 +247,7 @@ end; call test_commit_commit1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_commit1() line 3 at SQL statement +PL/pgSQL function test_commit_commit1() line 2 at SQL statement test_commit_commit1 --------------------- @@ -274,7 +274,7 @@ end; call test_commit_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_rollback() line 2 at SQL statement test_commit_rollback ---------------------- @@ -303,7 +303,7 @@ end; call test_commit_rollback1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_rollback1() line 3 at SQL statement +PL/pgSQL function test_commit_rollback1() line 2 at SQL statement test_commit_rollback1 ----------------------- @@ -338,10 +338,10 @@ end; call test_rollback_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback_commit() line 3 at SQL statement +PL/pgSQL function test_rollback_commit() line 2 at SQL statement NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback_commit() line 8 at SQL statement +PL/pgSQL function test_rollback_commit() line 7 at SQL statement test_rollback_commit ---------------------- @@ -372,7 +372,7 @@ end; call test_commit_insert_exception_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_exception_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_insert_exception_rollback() line 2 at SQL statement test_commit_insert_exception_rollback --------------------------------------- @@ -403,7 +403,7 @@ end; call test_commit_insert_exception_commit_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_exception_commit_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_insert_exception_commit_rollback() line 2 at SQL statement test_commit_insert_exception_commit_rollback ---------------------------------------------- @@ -430,7 +430,7 @@ end; call test_commit_insert_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -454,7 +454,7 @@ end; call test_commit_insert_delete_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -477,7 +477,7 @@ end; call test_commit_insert_update_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -501,7 +501,7 @@ end; call test_commit_insert_update_delete_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_delete_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_delete_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -525,7 +525,7 @@ end; call test_commit_insert_delete_update_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_update_raise_commit() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_update_raise_commit() line 2 at SQL statement ERROR: After commit select * from test_commit; a | b @@ -569,7 +569,7 @@ end; call test_commit_insert_delete_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -591,7 +591,7 @@ end; call test_commit_insert_update_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -614,7 +614,7 @@ end; call test_commit_insert_update_delete_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_update_delete_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_update_delete_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -638,7 +638,7 @@ end; call test_commit_insert_delete_update_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_insert_delete_update_commit_raise() line 3 at SQL statement +PL/pgSQL function test_commit_insert_delete_update_commit_raise() line 2 at SQL statement ERROR: Before commit select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -664,7 +664,7 @@ end; call test_exception_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_exception_commit() line 3 at SQL statement +PL/pgSQL function test_exception_commit() line 2 at SQL statement test_exception_commit ----------------------- @@ -696,7 +696,7 @@ end; call test_exception_commit_commit_raise(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_exception_commit_commit_raise() line 3 at SQL statement +PL/pgSQL function test_exception_commit_commit_raise() line 2 at SQL statement ERROR: (After commit) select * from test_commit; a | b @@ -724,7 +724,7 @@ end; call test_exception_commit_raise_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_exception_commit_raise_commit() line 3 at SQL statement +PL/pgSQL function test_exception_commit_raise_commit() line 2 at SQL statement ERROR: (After commit) select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 @@ -754,7 +754,7 @@ end; call test_gg_1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_gg_1() line 3 at SQL statement +PL/pgSQL function test_gg_1() line 2 at SQL statement test_gg_1 ----------- @@ -788,7 +788,7 @@ end; call test_commit_exception(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception() line 3 at SQL statement +PL/pgSQL function test_commit_exception() line 2 at SQL statement test_commit_exception ----------------------- @@ -824,7 +824,7 @@ end; call test_commit2(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit2() line 3 at SQL statement +PL/pgSQL function test_commit2() line 2 at SQL statement test_commit2 -------------- @@ -859,7 +859,7 @@ end; call test_commit3(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit3() line 3 at SQL statement +PL/pgSQL function test_commit3() line 2 at SQL statement test_commit3 -------------- @@ -891,7 +891,7 @@ end; call test_rollback_with_exception(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback_with_exception() line 3 at SQL statement +PL/pgSQL function test_rollback_with_exception() line 2 at SQL statement test_rollback_with_exception ------------------------------ @@ -919,7 +919,7 @@ end; call test_nest_procedure_without_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_nest_procedure_without_commit() line 3 at SQL statement +PL/pgSQL function test_nest_procedure_without_commit() line 2 at SQL statement test_nest_procedure_without_commit ------------------------------------ @@ -948,7 +948,7 @@ end; call test_nest_procedure(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_nest_procedure() line 3 at SQL statement +PL/pgSQL function test_nest_procedure() line 2 at SQL statement test_nest_procedure --------------------- @@ -973,9 +973,9 @@ end; call test_nest_procedure1(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit() line 3 at SQL statement +PL/pgSQL function test_commit() line 2 at SQL statement SQL statement "CALL test_commit()" -PL/pgSQL function test_nest_procedure1() line 3 at PERFORM +PL/pgSQL function test_nest_procedure1() line 2 at PERFORM test_nest_procedure1 ---------------------- @@ -997,9 +997,9 @@ end; call test_nest_procedure2(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit() line 3 at SQL statement +PL/pgSQL function test_commit() line 2 at SQL statement SQL statement "CALL test_commit()" -PL/pgSQL function test_nest_procedure2() line 3 at PERFORM +PL/pgSQL function test_nest_procedure2() line 2 at PERFORM test_nest_procedure2 ---------------------- @@ -1022,9 +1022,9 @@ end; call test_nest_procedure_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_without_commit() line 3 at SQL statement +PL/pgSQL function test_without_commit() line 2 at SQL statement SQL statement "CALL test_without_commit()" -PL/pgSQL function test_nest_procedure_rollback() line 3 at PERFORM +PL/pgSQL function test_nest_procedure_rollback() line 2 at PERFORM test_nest_procedure_rollback ------------------------------ @@ -1052,7 +1052,7 @@ ERROR: relation "tx" does not exist on datanode1 LINE 1: insert into tx select 3 ^ QUERY: insert into tx select 3 -CONTEXT: PL/pgSQL function test_nest_procedure_select() line 3 at SQL statement +CONTEXT: PL/pgSQL function test_nest_procedure_select() line 2 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1075,7 +1075,7 @@ ERROR: relation "tx" does not exist on datanode1 LINE 1: insert into tx select 3 ^ QUERY: insert into tx select 3 -CONTEXT: PL/pgSQL function test_nest_procedure_calll() line 3 at SQL statement +CONTEXT: PL/pgSQL function test_nest_procedure_calll() line 2 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1099,12 +1099,12 @@ end; call test_commit_exception_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception_commit() line 3 at SQL statement +PL/pgSQL function test_commit_exception_commit() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 3 ^ QUERY: insert into test_commit select 3 -CONTEXT: PL/pgSQL function test_commit_exception_commit() line 10 at SQL statement +CONTEXT: PL/pgSQL function test_commit_exception_commit() line 9 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1129,12 +1129,12 @@ end; call test_commit_exception_commit_commit(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception_commit_commit() line 3 at SQL statement +PL/pgSQL function test_commit_exception_commit_commit() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 3 ^ QUERY: insert into test_commit select 3 -CONTEXT: PL/pgSQL function test_commit_exception_commit_commit() line 10 at SQL statement +CONTEXT: PL/pgSQL function test_commit_exception_commit_commit() line 9 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1159,12 +1159,12 @@ end; call test_commit_exception_commit_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_commit_exception_commit_rollback() line 3 at SQL statement +PL/pgSQL function test_commit_exception_commit_rollback() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 3 ^ QUERY: insert into test_commit select 3 -CONTEXT: PL/pgSQL function test_commit_exception_commit_rollback() line 10 at SQL statement +CONTEXT: PL/pgSQL function test_commit_exception_commit_rollback() line 9 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; @@ -1184,12 +1184,12 @@ end; call test_rollback(); NOTICE: table "test_commit" does not exist, skipping CONTEXT: SQL statement "drop table if exists test_commit" -PL/pgSQL function test_rollback() line 3 at SQL statement +PL/pgSQL function test_rollback() line 2 at SQL statement ERROR: relation "test_commit" does not exist on datanode1 LINE 1: insert into test_commit select 2 ^ QUERY: insert into test_commit select 2 -CONTEXT: PL/pgSQL function test_rollback() line 7 at SQL statement +CONTEXT: PL/pgSQL function test_rollback() line 6 at SQL statement select * from test_commit; ERROR: relation "test_commit" does not exist on datanode1 LINE 1: select * from test_commit; diff --git a/src/test/regress/output/trigger_dump.source b/src/test/regress/output/trigger_dump.source index b735ade81e..e8c2a9d192 100644 --- a/src/test/regress/output/trigger_dump.source +++ b/src/test/regress/output/trigger_dump.source @@ -61,7 +61,7 @@ insert into old_dump values(2,2); ERROR: permission denied for relation tab_dump DETAIL: N/A CONTEXT: SQL statement "insert into tab_dump values(new.id,new.c1)" -PL/pgSQL function tri_dump_old_dump_inlinefunc() line 3 at SQL statement +PL/pgSQL function tri_dump_old_dump_inlinefunc() line 2 at SQL statement \c test2_dump --insert insert into old_dump values(2,2); @@ -84,7 +84,7 @@ insert into old_dump values(2,2); ERROR: permission denied for relation tab_dump DETAIL: N/A CONTEXT: SQL statement "insert into tab_dump values(new.id,new.c1)" -PL/pgSQL function tri_dump_old_dump_inlinefunc() line 3 at SQL statement +PL/pgSQL function tri_dump_old_dump_inlinefunc() line 2 at SQL statement \c regression drop database test_dump; drop database test1_dump; diff --git a/src/test/regress/output/view_definer_test.source b/src/test/regress/output/view_definer_test.source index aff9730f44..e2ce3d5734 100755 --- a/src/test/regress/output/view_definer_test.source +++ b/src/test/regress/output/view_definer_test.source @@ -66,8 +66,7 @@ ALTER SCHEMA "Test_User" OWNER TO "Test_User"; CREATE SCHEMA test_user2; ALTER SCHEMA test_user2 OWNER TO test_user2; CREATE DEFINER = "Root_Test" PROCEDURE pro_1107262(n int) NOT SHIPPABLE - AS DECLARE -begin + AS DECLARE begin repeat insert into tab_1107262 values(n,n*2); n:=n+1; diff --git a/src/test/regress/sql/hw_procedure_define.sql b/src/test/regress/sql/hw_procedure_define.sql index b2103dc2d0..5491e5d9eb 100644 --- a/src/test/regress/sql/hw_procedure_define.sql +++ b/src/test/regress/sql/hw_procedure_define.sql @@ -634,5 +634,58 @@ drop procedure p_definer; drop procedure p_caller; drop table test_emp_001; drop procedure test_proc_using_001; + +create or replace procedure test_bt_b is +a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; +select test_bt_b(); + +create or replace procedure test_bt_b is + a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; +select test_bt_b(); + +create or replace procedure test_bt_b is +declare a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; +select test_bt_b(); + +create or replace procedure test_bt_b is + declare a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; +select test_bt_b(); + +create or +replace +procedure +test_bt_b +is + + + a int; + begin + a := 'abc'; +end; +/ +select prosrc from pg_proc where proname='test_bt_b'; +select test_bt_b(); +drop procedure test_bt_b; + \c regression; drop database IF EXISTS pl_test_pkg_define; -- Gitee