Fix report wrong position for procedure error.

This commit is contained in:
totaj
2023-04-21 17:56:45 +08:00
parent 1c92278937
commit 5ee62d44e1
51 changed files with 3171 additions and 3433 deletions

View File

@ -16709,16 +16709,19 @@ subprogram_body: {
if (add_declare) if (add_declare)
{ {
proc_body_str = (char *)palloc0(proc_body_len + DECLARE_LEN + 1); proc_body_str = (char *)palloc0(proc_body_len + DECLARE_LEN + 1);
strncpy(proc_body_str, DECLARE_STR, DECLARE_LEN + 1); rc = strcpy_s(proc_body_str, proc_body_len + DECLARE_LEN + 1, DECLARE_STR);
strncpy(proc_body_str + DECLARE_LEN, securec_check(rc, "", "");
yyextra->core_yy_extra.scanbuf + proc_b - 1, proc_body_len); 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; proc_body_len = DECLARE_LEN + proc_body_len;
} }
else else
{ {
proc_body_str = (char *)palloc0(proc_body_len + 1); proc_body_str = (char *)palloc0(proc_body_len + 1);
strncpy(proc_body_str, rc = strncpy_s(proc_body_str, proc_body_len + 1,
yyextra->core_yy_extra.scanbuf + proc_b - 1, proc_body_len); yyextra->core_yy_extra.scanbuf + proc_b, proc_body_len - 1);
securec_check(rc, "", "");
} }
proc_body_str[proc_body_len] = '\0'; proc_body_str[proc_body_len] = '\0';

View File

@ -685,7 +685,7 @@ begin
end; end;
/ /
ERROR: schema "colors" does not exist 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(); --call array_interface_p8();
-- test array exists interface A.B input parameter -- test array exists interface A.B input parameter
create or replace procedure array_interface_p9() create or replace procedure array_interface_p9()

View File

@ -87,10 +87,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "[" ERROR: syntax error at or near "["
LINE 6: colors.extend[1]; LINE 5: colors.extend[1];
^ ^
QUERY: QUERY: declare
declare
colors varchar[] := array['red']; colors varchar[] := array['red'];
begin begin
raise NOTICE'%',colors; raise NOTICE'%',colors;
@ -114,10 +113,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "[" ERROR: syntax error at or near "["
LINE 6: colors.trim[1]; LINE 5: colors.trim[1];
^ ^
QUERY: QUERY: declare
declare
colors varchar[] := array['red','orange','green','blue','indigo','violet']; colors varchar[] := array['red','orange','green','blue','indigo','violet'];
begin begin
raise NOTICE'%',colors; raise NOTICE'%',colors;
@ -151,10 +149,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "[" ERROR: syntax error at or near "["
LINE 18: colors4.delete[-1]; LINE 17: colors4.delete[-1];
^ ^
QUERY: QUERY: declare
declare
colors varchar[] := array['red','orange','green','blue','indigo','violet']; colors varchar[] := array['red','orange','green','blue','indigo','violet'];
colors2 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']; colors3 varchar[] := array['red','orange','green','blue','indigo','violet'];
@ -212,10 +209,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "@*" 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: QUERY: declare
declare
@*ar& integer[]:=array[1,0,5,6,8,3,9]; @*ar& integer[]:=array[1,0,5,6,8,3,9];
begin begin
raise NOTICE'%',@*ar&; raise NOTICE'%',@*ar&;
@ -292,10 +288,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "raise" ERROR: syntax error at or near "raise"
LINE 7: raise NOTICE'%',colors; LINE 6: raise NOTICE'%',colors;
^ ^
QUERY: QUERY: declare
declare
colors varchar[] := array['red','orange','green','blue','indigo','violet']; colors varchar[] := array['red','orange','green','blue','indigo','violet'];
begin begin
raise NOTICE'%',colors; raise NOTICE'%',colors;

View File

@ -155,11 +155,11 @@ end pck1;
call pck1.p1(); call pck1.p1();
ERROR: ERROR: division by zero ERROR: ERROR: division by zero
CONTEXT: SQL statement "SELECT 3/0" 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 referenced column: p2
CONTEXT: SQL statement "CALL p2(c1)" 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -234,7 +234,7 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -269,7 +269,7 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -305,7 +305,7 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -354,7 +354,7 @@ CONTEXT: PL/pgSQL function p2() during function exit
referenced column: p2 referenced column: p2
CONTEXT: SQL statement "CALL p2(c1)" 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; drop package pck1;
NOTICE: drop cascades to 3 other objects NOTICE: drop cascades to 3 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -403,7 +403,7 @@ CONTEXT: PL/pgSQL function p2() during function exit
referenced column: p2 referenced column: p2
CONTEXT: SQL statement "CALL p2(c1)" 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; drop package pck1;
NOTICE: drop cascades to 3 other objects NOTICE: drop cascades to 3 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -495,7 +495,7 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -534,7 +534,7 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -577,7 +577,7 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -803,7 +803,7 @@ truncate table t1;
call pck1.p1(); call pck1.p1();
INFO: rowcount: <NULL> INFO: rowcount: <NULL>
ERROR: cursor variable "c1" is null in FETCH statement. 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; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function pl_auto_ref.p1() DETAIL: drop cascades to function pl_auto_ref.p1()
@ -1655,7 +1655,7 @@ end;
call p1(); call p1();
INFO: p2:<unnamed portal 28> INFO: p2:<unnamed portal 28>
CONTEXT: SQL statement "CALL p2(c1)" 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:<unnamed portal 28> INFO: p1:<unnamed portal 28>
p1 p1
---- ----
@ -1731,11 +1731,11 @@ ERROR: ERROR: deadlock detected
--?* --?*
HINT: See server log for query details. HINT: See server log for query details.
CONTEXT: SQL statement "update t2_test set a=10" 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 referenced column: p2
CONTEXT: SQL statement "CALL p2(c1)" 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; select * from t2_test;
a | b | c | d | e | f | g a | b | c | d | e | f | g
---+-----+------+-------+----------+-------+------------ ---+-----+------+-------+----------+-------+------------
@ -1839,11 +1839,11 @@ end;
/ /
ERROR: ERROR: autonomous procedure out ref cursor parameter can not be assigned ERROR: ERROR: autonomous procedure out ref cursor parameter can not be assigned
DETAIL: procedure "p1()" out parameter "$1" not support to be assigned value 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 referenced column: p1
CONTEXT: SQL statement "CALL p1(va)" 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) create or replace procedure p1 (va out sys_refcursor)
as as
PRAGMA AUTONOMOUS_TRANSACTION; PRAGMA AUTONOMOUS_TRANSACTION;
@ -1859,11 +1859,11 @@ end;
/ /
ERROR: ERROR: autonomous procedure out ref cursor parameter can not be assigned ERROR: ERROR: autonomous procedure out ref cursor parameter can not be assigned
DETAIL: procedure "p1()" out parameter "va" not support to be assigned value 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 referenced column: p1
CONTEXT: SQL statement "CALL p1(va)" 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 table t1;
drop procedure p1; drop procedure p1;
-- test function with ref cursor -- test function with ref cursor

View File

@ -953,7 +953,7 @@ raise notice 'p1:%',p1;
end; end;
/ /
ERROR: 'ITERATE label' is only in database which dbcompatibility='B'. 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 --error
create or replace procedure doiterate(p1 int) create or replace procedure doiterate(p1 int)
as as
@ -969,7 +969,7 @@ raise notice 'p1:%',p1;
end; end;
/ /
ERROR: 'LEAVE label' is only in database which dbcompatibility='B'. 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 --success
create or replace procedure doiterate(p1 int) create or replace procedure doiterate(p1 int)
as as
@ -1223,7 +1223,7 @@ NOTICE: identifier "label111111111111111111111111111111111111111111111111111111
NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111"
CONTEXT: compilation of PL/pgSQL function "proc_label" near line 1 CONTEXT: compilation of PL/pgSQL function "proc_label" near line 1
NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" 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 --success
create or replace procedure proc_label1(n int) create or replace procedure proc_label1(n int)
as as
@ -1242,7 +1242,7 @@ NOTICE: identifier "label111111111111111111111111111111111111111111111111111111
NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111"
CONTEXT: compilation of PL/pgSQL function "proc_label1" near line 1 CONTEXT: compilation of PL/pgSQL function "proc_label1" near line 1
NOTICE: identifier "label11111111111111111111111111111111111111111111111111111111112" will be truncated to "label1111111111111111111111111111111111111111111111111111111111" 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); call proc_label(5);
proc_label proc_label
------------ ------------
@ -1291,7 +1291,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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 CREATE OR REPLACE FUNCTION func1(num1 in int, num2 inout int, res out int) RETURNS record
AS $$ AS $$
DECLARE DECLARE
@ -1331,7 +1331,7 @@ end;
NOTICE: 10,100 NOTICE: 10,100
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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) create or replace procedure debug(num1 in int, num2 inout int, res out int)
as begin as begin
num2 := num2 + 1; num2 := num2 + 1;
@ -1363,7 +1363,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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) create or replace procedure call(num1 in int, num2 inout int, res out int)
as begin as begin
num2 := num2 + 1; num2 := num2 + 1;
@ -1395,7 +1395,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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; drop procedure call;
CREATE OR REPLACE FUNCTION call() RETURNS int CREATE OR REPLACE FUNCTION call() RETURNS int
AS $$ AS $$
@ -1420,10 +1420,9 @@ call;
end; end;
/ /
ERROR: syntax error at end of input ERROR: syntax error at end of input
LINE 3: call; LINE 2: call;
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
call; call;
end end
--error --error
@ -1434,7 +1433,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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 --error
declare declare
begin begin
@ -1442,10 +1441,9 @@ call call;
end; end;
/ /
ERROR: syntax error at end of input ERROR: syntax error at end of input
LINE 3: call call; LINE 2: call call;
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
call call; call call;
end end
create schema test; create schema test;
@ -1473,7 +1471,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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) create or replace procedure test.debug(num1 in int, num2 inout int, res out int)
as begin as begin
num2 := num2 + 1; num2 := num2 + 1;
@ -1505,7 +1503,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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) create or replace procedure test.call(num1 in int, num2 inout int, res out int)
as begin as begin
num2 := num2 + 1; num2 := num2 + 1;
@ -1537,7 +1535,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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 procedure func_zzm;
drop function func1; drop function func1;
drop procedure debug; drop procedure debug;
@ -1700,10 +1698,9 @@ call;
end; end;
/ /
ERROR: syntax error at end of input ERROR: syntax error at end of input
LINE 3: call; LINE 2: call;
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
call; call;
end end
--success --success
@ -1719,10 +1716,9 @@ call call;
end; end;
/ /
ERROR: syntax error at end of input ERROR: syntax error at end of input
LINE 3: call call; LINE 2: call call;
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
call call; call call;
end end
create schema test; create schema test;
@ -2243,10 +2239,9 @@ the_while:
end; end;
/ /
ERROR: while-loop syntax is mixed with while-do syntax ERROR: while-loop syntax is mixed with while-do syntax
LINE 5: while _i < 10 loop LINE 4: while _i < 10 loop
^ ^
QUERY: QUERY: declare _i integer = 0;
declare _i integer = 0;
BEGIN BEGIN
the_while: the_while:
while _i < 10 loop while _i < 10 loop
@ -2268,10 +2263,9 @@ BEGIN
end; end;
/ /
ERROR: 'while-do' is only supported in database which dbcompatibility='B'. ERROR: 'while-do' is only supported in database which dbcompatibility='B'.
LINE 4: while _i < 10 do LINE 3: while _i < 10 do
^ ^
QUERY: QUERY: declare _i integer = 0;
declare _i integer = 0;
BEGIN BEGIN
while _i < 10 do while _i < 10 do
_i := _i + 1; _i := _i + 1;
@ -2292,10 +2286,9 @@ BEGIN
end; end;
/ /
ERROR: while-loop syntax is mixed with while-do syntax ERROR: while-loop syntax is mixed with while-do syntax
LINE 4: while _i < 10 loop LINE 3: while _i < 10 loop
^ ^
QUERY: QUERY: declare _i integer = 0;
declare _i integer = 0;
BEGIN BEGIN
while _i < 10 loop while _i < 10 loop
_i := _i + 1; _i := _i + 1;
@ -2319,7 +2312,7 @@ raise notice '%',i;
end; end;
/ /
ERROR: 'repeat' is only supported in database which dbcompatibility='B'. 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 --error
CREATE or replace PROCEDURE dorepeat(p1 INT) CREATE or replace PROCEDURE dorepeat(p1 INT)
as as
@ -2334,7 +2327,7 @@ raise notice '%',i;
end; end;
/ /
ERROR: 'repeat' is only supported in database which dbcompatibility='B'. 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 --error
CREATE or replace PROCEDURE dorepeat(p1 INT) CREATE or replace PROCEDURE dorepeat(p1 INT)
as as
@ -2349,7 +2342,7 @@ raise notice '%',i;
end; end;
/ /
ERROR: 'label:' is only supported in database which dbcompatibility='B'. 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; drop function if exists dorepeat;
NOTICE: function dorepeat() does not exist, skipping NOTICE: function dorepeat() does not exist, skipping
\c b \c b
@ -2449,10 +2442,9 @@ raise notice '%',i;
end; end;
/ /
ERROR: The label name is invalid ERROR: The label name is invalid
LINE 5: repeat: LINE 4: repeat:
^ ^
QUERY: QUERY: declare
declare
i int =0; i int =0;
BEGIN BEGIN
repeat: repeat:

View File

@ -18,17 +18,16 @@ return n;
end; end;
/ /
NOTICE: syntax error at or near "]" NOTICE: syntax error at or near "]"
LINE 4: n := v[]; LINE 3: n := v[];
^ ^
QUERY: DECLARE QUERY: DECLARE n int;
n int;
begin begin
n := v[]; n := v[];
return n; return n;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A 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; set plsql_show_all_error to off;
create or replace function f(v int[]) return int create or replace function f(v int[]) return int
as as
@ -47,10 +46,9 @@ return n;
end; end;
/ /
ERROR: syntax error at or near "]" ERROR: syntax error at or near "]"
LINE 4: n := v[]; LINE 3: n := v[];
^ ^
QUERY: DECLARE QUERY: DECLARE n int;
n int;
begin begin
n := v[]; n := v[];
return n; return n;
@ -77,17 +75,16 @@ return n;
end; end;
/ /
NOTICE: syntax error at or near "]" NOTICE: syntax error at or near "]"
LINE 4: n := v[]; LINE 3: n := v[];
^ ^
QUERY: DECLARE QUERY: DECLARE n int;
n int;
begin begin
n := v[]; n := v[];
return n; return n;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A 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; set plsql_show_all_error to off;
create or replace function f(v int[]) return int create or replace function f(v int[]) return int
as as
@ -106,10 +103,9 @@ return n;
end; end;
/ /
ERROR: syntax error at or near "]" ERROR: syntax error at or near "]"
LINE 4: n := v[]; LINE 3: n := v[];
^ ^
QUERY: DECLARE QUERY: DECLARE n int;
n int;
begin begin
n := v[]; n := v[];
return n; return n;

View File

@ -340,7 +340,7 @@ call pro_insert_trunc(43947123894723895743728943.5425235,'2016-06-30','2013-12-1
ERROR: value too long for type character(6) ERROR: value too long for type character(6)
CONTEXT: referenced column: c_char1 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))" 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; set td_compatible_truncation=on;
show td_compatible_truncation; show td_compatible_truncation;
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) ERROR: value too long for type character(6)
CONTEXT: referenced column: c_char1 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))" 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 table if exists inst_trc_t1_01;
drop procedure if exists pro_insert_trunc; drop procedure if exists pro_insert_trunc;
--Prepare stmt test --Prepare stmt test

View File

@ -46,9 +46,9 @@ END ;
/ /
call proc_test(); call proc_test();
ERROR: commit/rollback/savepoint is not allowed in a non-volatile function 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()" 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 create or replace procedure p1(a out varchar2,b int) is
begin begin
a:='aa'||b; a:='aa'||b;
@ -63,5 +63,5 @@ raise info 'var:%',var;
end; end;
/ /
INFO: a:aa3 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 INFO: var:aa3

View File

@ -176,7 +176,7 @@ END;
ERROR: refcursor not support declare multiple variable ERROR: refcursor not support declare multiple variable
LINE 2: C1,C2 CURSOR_TYPE; 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; C1,C2 CURSOR_TYPE;
BEGIN BEGIN
END END
@ -186,9 +186,9 @@ BEGIN
END; END;
/ /
ERROR: refcursor not support declare multiple variable ERROR: refcursor not support declare multiple variable
LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR; LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR;
^ ^
QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR; QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR;
BEGIN BEGIN
END END
--test declare mutile variabe for alias --test declare mutile variabe for alias
@ -201,7 +201,7 @@ END;
ERROR: alias not support declare multiple variable ERROR: alias not support declare multiple variable
LINE 2: DECLARE alias1,alias2 ALIAS FOR old1; LINE 2: DECLARE alias1,alias2 ALIAS FOR old1;
^ ^
QUERY: DECLARE old1,old2 int; QUERY: DECLARE old1,old2 int;
DECLARE alias1,alias2 ALIAS FOR old1; DECLARE alias1,alias2 ALIAS FOR old1;
BEGIN BEGIN
END END
@ -234,9 +234,9 @@ BEGIN
END; END;
/ /
ERROR: not support declare multiple variable ERROR: not support declare multiple variable
LINE 1: 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); QUERY: DECLARE DECLARE res1,res2 int default (3+4);
DECLARE str1,str2 text default 'opengunass'; DECLARE str1,str2 text default 'opengunass';
DECLARE num1,num2,num3 number default 23.34; DECLARE num1,num2,num3 number default 23.34;
DECLARE mon1,mon2 money default 1000.00; DECLARE mon1,mon2 money default 1000.00;
@ -271,7 +271,7 @@ END;
ERROR: not support declare multiple variable ERROR: not support declare multiple variable
LINE 2: C1,C2 CURSOR_TYPE; 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; C1,C2 CURSOR_TYPE;
BEGIN BEGIN
END END
@ -281,9 +281,9 @@ BEGIN
END; END;
/ /
ERROR: not support declare multiple variable ERROR: not support declare multiple variable
LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR; LINE 1: DECLARE DECLARE C1,C2 SYS_REFCURSOR;
^ ^
QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR; QUERY: DECLARE DECLARE C1,C2 SYS_REFCURSOR;
BEGIN BEGIN
END END
--test declare mutile variabe for alias --test declare mutile variabe for alias
@ -294,9 +294,9 @@ BEGIN
END; END;
/ /
ERROR: not support declare multiple variable ERROR: not support declare multiple variable
LINE 1: DECLARE old1,old2 int; LINE 1: DECLARE old1,old2 int;
^ ^
QUERY: DECLARE old1,old2 int; QUERY: DECLARE old1,old2 int;
DECLARE alias1,alias2 ALIAS FOR old1; DECLARE alias1,alias2 ALIAS FOR old1;
BEGIN BEGIN
END END
@ -320,10 +320,9 @@ begin
end; end;
/ /
ERROR: not support declare multiple variable 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 QUERY: DECLARE type t1 is varray(10) of int;
type t1 is varray(10) of int;
type t2 is table of int; type t2 is table of int;
type t3 is table of varchar2(10) index by varchar2(10); type t3 is table of varchar2(10) index by varchar2(10);
type t4 is varray(10) of text; type t4 is varray(10) of text;
@ -358,10 +357,9 @@ begin
end; end;
/ /
ERROR: not support declare multiple variable 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 QUERY: DECLARE type t1 is varray(10) of int;
type t1 is varray(10) of int;
type t2 is table of int; type t2 is table of int;
type t3 is table of varchar2(10) index by varchar2(10); type t3 is table of varchar2(10) index by varchar2(10);
type t4 is varray(10) of text; type t4 is varray(10) of text;

View File

@ -1484,9 +1484,9 @@ call sche1.pro();
ERROR: relation "test" already exists in schema "sche1" ERROR: relation "test" already exists in schema "sche1"
DETAIL: creating new table with existing name in the same schema DETAIL: creating new table with existing name in the same schema
CONTEXT: SQL statement "create table test as select * from sche_t1" 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()" 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; drop schema sche1 cascade;
NOTICE: drop cascades to 3 other objects NOTICE: drop cascades to 3 other objects
DETAIL: drop cascades to table sche1.sche_t1 DETAIL: drop cascades to table sche1.sche_t1

View File

@ -367,13 +367,13 @@ end;
/ /
call proc_test(1,'hello'); call proc_test(1,'hello');
NOTICE: dfdf+f 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 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 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 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: t
NOTICE: 0 NOTICE: 0
o_retcode o_retcode
@ -434,11 +434,11 @@ end;
call proc_test(1); call proc_test(1);
NOTICE: v_c row count 0 NOTICE: v_c row count 0
NOTICE: open is true 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 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 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 found is true
NOTICE: v_c row count 1 NOTICE: v_c row count 1
proc_test proc_test
@ -656,12 +656,12 @@ select proc_test('1');
NOTICE: a is open NOTICE: a is open
CONTEXT: referenced column: func_test CONTEXT: referenced column: func_test
SQL statement "SELECT func_test(v_c,i_b)" 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 referenced column: proc_test
NOTICE: fetch is execute NOTICE: fetch is execute
CONTEXT: referenced column: func_test CONTEXT: referenced column: func_test
SQL statement "SELECT func_test(v_c,i_b)" 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 referenced column: proc_test
NOTICE: t NOTICE: t
CONTEXT: referenced column: proc_test CONTEXT: referenced column: proc_test
@ -970,11 +970,11 @@ close c;
end; end;
/ /
NOTICE: a1:1 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 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. 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); create table t1_refcursor(a int);
insert into t1_refcursor values (1); insert into t1_refcursor values (1);
insert into t1_refcursor values (2); insert into t1_refcursor values (2);

View File

@ -925,7 +925,7 @@ end
/ /
NOTICE: 1,true,1 NOTICE: 1,true,1
CONTEXT: SQL statement "CALL proc_test()" 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 NOTICE: 1,true,1
drop table tb_test; drop table tb_test;
drop schema hw_cursor_part7 CASCADE; drop schema hw_cursor_part7 CASCADE;

View File

@ -424,7 +424,7 @@ NOTICE: test cursor
close pro_cursor_c0019_1; close pro_cursor_c0019_1;
select * from pro_cursor_c0019(); select * from pro_cursor_c0019();
ERROR: cannot open FETCH query as cursor 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); create table test_cursor_table(c1 int,c2 varchar);
insert into test_cursor_table values(1,'Jack'),(2,'Rose'); insert into test_cursor_table values(1,'Jack'),(2,'Rose');
create or replace procedure test_cursor_8() as create or replace procedure test_cursor_8() as

View File

@ -41,10 +41,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 2 indexscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 1; set enable_indexscan = 1;
@ -85,10 +85,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 3 indexonlyscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -128,10 +128,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 4 bitmapscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -173,10 +173,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 5 tidscan
drop table pl_txn_t; drop table pl_txn_t;
create table pl_txn_t(tc1 int,b number(3)); create table pl_txn_t(tc1 int,b number(3));
@ -219,16 +219,16 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: ----(0,1) NOTICE: ----(0,1)
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: ----1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 Multiple tables: Open after insert,rollback
--case 6-1 seqscan --case 6-1 seqscan
drop table pl_txn_t; drop table pl_txn_t;
@ -281,10 +281,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-2 indexscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 1; set enable_indexscan = 1;
@ -326,10 +326,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-3 indexonlyscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -371,10 +371,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-4 bitmapscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -418,10 +418,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-5 tidscan
drop table pl_txn_t; drop table pl_txn_t;
drop table pl_txn_t2; drop table pl_txn_t2;
@ -474,16 +474,16 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: ----(0,1) NOTICE: ----(0,1)
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: ----1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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; drop schema hw_cursor_rollback CASCADE;
NOTICE: drop cascades to 5 other objects NOTICE: drop cascades to 5 other objects
--?DETAIL: drop cascades to package .* --?DETAIL: drop cascades to package .*

View File

@ -41,10 +41,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 2 indexscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 1; set enable_indexscan = 1;
@ -85,10 +85,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 3 indexonlyscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -128,10 +128,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 4 bitmapscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -173,10 +173,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 5 tidscan
drop table pl_txn_t; drop table pl_txn_t;
create table pl_txn_t(tc1 int,b number(3)) with (STORAGE_TYPE = USTORE); create table pl_txn_t(tc1 int,b number(3)) with (STORAGE_TYPE = USTORE);
@ -219,16 +219,16 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: ----(0,1) NOTICE: ----(0,1)
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: ----1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 Multiple tables: Open after insert,rollback
--case 6-1 seqscan --case 6-1 seqscan
drop table pl_txn_t; drop table pl_txn_t;
@ -281,10 +281,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-2 indexscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 1; set enable_indexscan = 1;
@ -326,10 +326,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-3 indexonlyscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -371,10 +371,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-4 bitmapscan
set enable_seqscan = 0; set enable_seqscan = 0;
set enable_indexscan = 0; set enable_indexscan = 0;
@ -418,10 +418,10 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: 1 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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 --case 6-5 tidscan
drop table pl_txn_t; drop table pl_txn_t;
drop table pl_txn_t2; drop table pl_txn_t2;
@ -474,16 +474,16 @@ end savepck;
call savepck.save2(); call savepck.save2();
NOTICE: ----(0,1) NOTICE: ----(0,1)
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: ----1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 1
CONTEXT: SQL statement "CALL savepointtest(c1)" 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 NOTICE: 2
ERROR: The data has been rollback, and the cursor data cannot be obtained. 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; drop schema hw_cursor_rollback_ustore CASCADE;
NOTICE: drop cascades to 5 other objects NOTICE: drop cascades to 5 other objects
--?DETAIL: drop cascades to package .* --?DETAIL: drop cascades to package .*

View File

@ -30,7 +30,7 @@ end;
/ /
call test_explain_param(123); call test_explain_param(123);
ERROR: query has no destination for result data 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 --- test 1: Insert with nonzero rows
---- ----

View File

@ -137,7 +137,7 @@ begin
end; end;
/ /
ERROR: invalid input syntax for integer: "abc" 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 declare
a int := 1; a int := 1;
b int; b int;
@ -156,7 +156,7 @@ AS
ERROR: RETURN cannot have a parameter in function returning void ERROR: RETURN cannot have a parameter in function returning void
LINE 2: RETURN i; LINE 2: RETURN i;
^ ^
QUERY: DECLARE BEGIN QUERY: DECLARE BEGIN
RETURN i; RETURN i;
END END
--ora err --ora err
@ -287,7 +287,7 @@ AS
ERROR: RETURN must specify a record or row variable in function returning row ERROR: RETURN must specify a record or row variable in function returning row
LINE 3: RETURN result; LINE 3: RETURN result;
^ ^
QUERY: DECLARE result int; QUERY: DECLARE result int;
BEGIN BEGIN
RETURN result; RETURN result;
END END
@ -310,7 +310,7 @@ AS
ERROR: RETURN must specify a record or row variable in function returning row ERROR: RETURN must specify a record or row variable in function returning row
LINE 3: RETURN 1; LINE 3: RETURN 1;
^ ^
QUERY: DECLARE result int; QUERY: DECLARE result int;
BEGIN BEGIN
RETURN 1; RETURN 1;
END 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. 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) 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 declare
a int := 1; a int := 1;
b 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. 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) 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; DROP FUNCTION test_return;
declare declare
temp varchar2(20); temp varchar2(20);
@ -734,7 +734,7 @@ begin
end; end;
/ /
ERROR: invalid input syntax for integer: "abc" 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 declare
a int := 1; a int := 1;
b int; b int;
@ -753,7 +753,7 @@ AS
ERROR: RETURN cannot have a parameter in function returning void ERROR: RETURN cannot have a parameter in function returning void
LINE 2: RETURN i; LINE 2: RETURN i;
^ ^
QUERY: DECLARE BEGIN QUERY: DECLARE BEGIN
RETURN i; RETURN i;
END END
--ora err --ora err
@ -884,7 +884,7 @@ AS
ERROR: RETURN must specify a record or row variable in function returning row ERROR: RETURN must specify a record or row variable in function returning row
LINE 3: RETURN result; LINE 3: RETURN result;
^ ^
QUERY: DECLARE result int; QUERY: DECLARE result int;
BEGIN BEGIN
RETURN result; RETURN result;
END END
@ -907,7 +907,7 @@ AS
ERROR: RETURN must specify a record or row variable in function returning row ERROR: RETURN must specify a record or row variable in function returning row
LINE 3: RETURN 1; LINE 3: RETURN 1;
^ ^
QUERY: DECLARE result int; QUERY: DECLARE result int;
BEGIN BEGIN
RETURN 1; RETURN 1;
END 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. 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) 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 declare
a int := 1; a int := 1;
b 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. 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) 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; DROP FUNCTION test_return;
declare declare
temp varchar2(20); temp varchar2(20);

View File

@ -67,13 +67,13 @@ SET SESSION AUTHORIZATION test_grant2 password 'Gauss123';
call test_grant1.pck3.p1(); call test_grant1.pck3.p1();
INFO: va:(1,zhangsan,shanghai) INFO: va:(1,zhangsan,shanghai)
CONTEXT: SQL statement "CALL p2(b,va,1,vb)" 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) INFO: vb(233):(10087,aa,bb)
CONTEXT: SQL statement "CALL p2(b,va,1,vb)" 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)"} INFO: vb:{"(10086,aa,bb)","(10087,aa,bb)"}
CONTEXT: SQL statement "CALL p2(b,va,1,vb)" 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 p1
---- ----

View File

@ -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 CREATE OR REPLACE FUNCTION public.feature_cross_test.func3(a int --函数入参注释 end
) )
RETURN numeric NOT FENCED NOT SHIPPABLE PACKAGE RETURN numeric NOT FENCED NOT SHIPPABLE PACKAGE
AS DECLARE AS DECLARE --函数头部注释
--函数头部注释
begin begin
data1 := 1; data1 := 1;
data2 := 2; data2 := 2;
@ -387,10 +386,9 @@ END;
END autonomous_pkg_150; END autonomous_pkg_150;
/ /
ERROR: mismatched parentheses at or near ")" 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 QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION;
PRAGMA AUTONOMOUS_TRANSACTION;
re_int INT; re_int INT;
BEGIN BEGIN
re_int:=autonomous_1; re_int:=autonomous_1;
@ -520,7 +518,7 @@ ERROR: package instantiation can not have autonomous function
DETAIL: this package have autonmous function DETAIL: this package have autonmous function
CONTEXT: referenced column: autonomous_f_150_1 CONTEXT: referenced column: autonomous_f_150_1
SQL statement "SELECT autonomous_f_150_1(autonomous_f_150_1_private(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 compilation of PL/pgSQL package near line 0
create or replace package pack_log create or replace package pack_log
is is
@ -649,7 +647,7 @@ select multi_sql.func16();
ERROR: alter function in package is not allowed ERROR: alter function in package is not allowed
DETAIL: please rebuild package DETAIL: please rebuild package
CONTEXT: SQL statement "alter function func5() rename to func25" 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 referenced column: func16
create or replace package aa create or replace package aa
is is
@ -748,7 +746,7 @@ call multi_sql.func16();
ERROR: alter function in package is not allowed ERROR: alter function in package is not allowed
DETAIL: please rebuild package DETAIL: please rebuild package
CONTEXT: SQL statement "alter function func5() rename to func25" 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 create or replace package pkgschema1.aa
is is
a int:=1; a int:=1;
@ -841,10 +839,9 @@ end;
end test1; end test1;
/ /
ERROR: "test1.a" is not a known variable 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 QUERY: DECLARE begin
begin
for rec in (select 1) loop for rec in (select 1) loop
begin begin
test1.a:=case when 1>2 then 1 else 1 end; test1.a:=case when 1>2 then 1 else 1 end;
@ -1058,10 +1055,9 @@ end;
end pckg_test; end pckg_test;
/ /
ERROR: type "tb_test" does not exist ERROR: type "tb_test" does not exist
LINE 2: v_t tb_test; LINE 1: DECLARE v_t tb_test;
^ ^
QUERY: DECLARE QUERY: DECLARE v_t tb_test;
v_t tb_test;
o_list sys_refcursor; o_list sys_refcursor;
begin begin
for rec in (select col1,col2 from tb_test where col1<i_col1) loop for rec in (select col1,col2 from tb_test where col1<i_col1) loop
@ -1123,13 +1119,13 @@ end pck1;
call pck1.pp2(); call pck1.pp2();
NOTICE: a:no value NOTICE: a:no value
CONTEXT: SQL statement "CALL pck1.pp1()" CONTEXT: SQL statement "CALL pck1.pp1()"
PL/pgSQL function pp2() line 3 at PERFORM PL/pgSQL function pp2() line 2 at PERFORM
NOTICE: a:no value NOTICE: a:no value
CONTEXT: SQL statement "CALL pck1.pp1()" CONTEXT: SQL statement "CALL pck1.pp1()"
PL/pgSQL function pp2() line 4 at PERFORM PL/pgSQL function pp2() line 3 at PERFORM
NOTICE: a:assign value NOTICE: a:assign value
CONTEXT: SQL statement "CALL pck1.pp1('assign value')" CONTEXT: SQL statement "CALL pck1.pp1('assign value')"
PL/pgSQL function pp2() line 5 at PERFORM PL/pgSQL function pp2() line 4 at PERFORM
pp2 pp2
----- -----
@ -1181,7 +1177,7 @@ end pck20;
call pck20.read_proc1(1); call pck20.read_proc1(1);
INFO: aa INFO: aa
CONTEXT: SQL statement "CALL read_proc1()" CONTEXT: SQL statement "CALL read_proc1()"
PL/pgSQL function read_proc1(integer) line 3 at PERFORM PL/pgSQL function read_proc1(integer) line 2 at PERFORM
INFO: bb INFO: bb
read_proc1 read_proc1
------------ ------------
@ -1219,10 +1215,9 @@ dbe_output.print_line('hello'||my_var);
end; end;
/ /
ERROR: syntax error at or near "transaction" ERROR: syntax error at or near "transaction"
LINE 3: begin transaction; LINE 2: begin transaction;
^ ^
QUERY: DECLARE QUERY: DECLARE my_var VARCHAR2(30);
my_var VARCHAR2(30);
begin transaction; begin transaction;
begin begin
my_var :='world'; my_var :='world';
@ -1464,8 +1459,7 @@ end a3;
\sf a3.func_1 \sf a3.func_1
CREATE OR REPLACE PROCEDURE t2.a3.func_1() CREATE OR REPLACE PROCEDURE t2.a3.func_1()
AUTHID CURRENT_USER PACKAGE AUTHID CURRENT_USER PACKAGE
AS DECLARE AS DECLARE begin
begin
insert into test1 values(1); insert into test1 values(1);
end; end;
/ /
@ -1564,25 +1558,25 @@ select proacl,prosecdef from pg_proc where proname='test5';
call t5.test5(); call t5.test5();
NOTICE: t2 NOTICE: t2
CONTEXT: SQL statement "CALL t2.test2()" CONTEXT: SQL statement "CALL t2.test2()"
PL/pgSQL function t3.test3() line 6 at PERFORM PL/pgSQL function t3.test3() line 5 at PERFORM
SQL statement "CALL t3.test3()" SQL statement "CALL t3.test3()"
PL/pgSQL function t4.test4() line 6 at PERFORM PL/pgSQL function t4.test4() line 5 at PERFORM
SQL statement "CALL t4.test4()" SQL statement "CALL t4.test4()"
PL/pgSQL function test5() line 6 at PERFORM PL/pgSQL function test5() line 5 at PERFORM
NOTICE: t2 NOTICE: t2
CONTEXT: SQL statement "CALL t2.test2()" CONTEXT: SQL statement "CALL t2.test2()"
PL/pgSQL function t3.test3() line 6 at PERFORM PL/pgSQL function t3.test3() line 5 at PERFORM
SQL statement "CALL t3.test3()" SQL statement "CALL t3.test3()"
PL/pgSQL function t4.test4() line 6 at PERFORM PL/pgSQL function t4.test4() line 5 at PERFORM
SQL statement "CALL t4.test4()" SQL statement "CALL t4.test4()"
PL/pgSQL function test5() line 6 at PERFORM PL/pgSQL function test5() line 5 at PERFORM
ERROR: division by zero ERROR: division by zero
CONTEXT: SQL statement "SELECT 2/0" CONTEXT: SQL statement "SELECT 2/0"
PL/pgSQL function t3.test3() line 4 at assignment PL/pgSQL function t3.test3() line 3 at assignment
SQL statement "CALL t3.test3()" SQL statement "CALL t3.test3()"
PL/pgSQL function t4.test4() line 6 at PERFORM PL/pgSQL function t4.test4() line 5 at PERFORM
SQL statement "CALL t4.test4()" SQL statement "CALL t4.test4()"
PL/pgSQL function test5() line 6 at PERFORM PL/pgSQL function test5() line 5 at PERFORM
reset session AUTHORIZATION; reset session AUTHORIZATION;
drop user t2 cascade; drop user t2 cascade;
drop user t3 cascade; drop user t3 cascade;
@ -1855,7 +1849,7 @@ NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function p1() DETAIL: drop cascades to function p1()
drop cascades to function p2() drop cascades to function p2()
CONTEXT: SQL statement "drop package pck1" CONTEXT: SQL statement "drop package pck1"
PL/pgSQL function p2() line 3 at SQL statement PL/pgSQL function p2() line 2 at SQL statement
p2 p2
---- ----
@ -1976,42 +1970,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: de2 is {"(201,201,varchar1200,clob1clob1200,00ABCDEF1200)","(202,202,varchar10200,clob2clob2200,00ABCDEF2200)"}
INFO: pkg059.col1 {} INFO: pkg059.col1 {}
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 {} INFO: pkg059.col2 {}
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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)"} INFO: col3 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"}
CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" 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 pkg059.func059_2(cf3)"
--?.* --?.*
SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)"
--?.* --?.*
SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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)"} INFO: col4 is {"(2,2,varchar10,clob2clob2,0ABCDEF2)","(1,1,varchar1,clob1clob1,0ABCDEF1)"}
CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" 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 pkg059.func059_2(cf3)"
--?.* --?.*
SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)"
--?.* --?.*
SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: cf2(1).c1 is <NULL>
CONTEXT: SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" CONTEXT: SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)"
--?.* --?.*
SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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)"} INFO: cp1 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"}
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: cp2 is <NULL>
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: cp3 is <NULL>
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: de2 out is <NULL>
create or replace package body pkg059 create or replace package body pkg059
is 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: de2 is {"(201,201,varchar1200,clob1clob1200,00ABCDEF1200)","(202,202,varchar10200,clob2clob2200,00ABCDEF2200)"}
INFO: pkg059.col1 {} INFO: pkg059.col1 {}
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 {} INFO: pkg059.col2 {}
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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)"} INFO: col3 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"}
CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" 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 pkg059.func059_2(cf3)"
--?.* --?.*
SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)"
--?.* --?.*
SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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)"} INFO: col4 is {"(2,2,varchar10,clob2clob2,0ABCDEF2)","(1,1,varchar1,clob1clob1,0ABCDEF1)"}
CONTEXT: SQL statement "CALL proc059_1(pkg059.col1,pkg059.col2)" 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 pkg059.func059_2(cf3)"
--?.* --?.*
SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)"
--?.* --?.*
SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: cf2(1).c1 is <NULL>
CONTEXT: SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)" CONTEXT: SQL statement "CALL func059_1_2(cf1=>pkg059.col1,cf2=>pkg059.col2)"
--?.* --?.*
SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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)"} INFO: cp1 is {"(1,1,varchar1,clob1clob1,0ABCDEF1)","(2,2,varchar10,clob2clob2,0ABCDEF2)"}
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: cp2 is <NULL>
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: cp3 is <NULL>
CONTEXT: SQL statement "CALL pkg059_1.proc059_1_1(de1,de2)" 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 <NULL> INFO: de2 out is <NULL>
--test alter package owner --test alter package owner
create user alt_package PASSWORD 'gauss@123'; create user alt_package PASSWORD 'gauss@123';
@ -2372,24 +2366,21 @@ call pck1.func2();
\sf p1 \sf p1
CREATE OR REPLACE PROCEDURE pkgsch059.p1() CREATE OR REPLACE PROCEDURE pkgsch059.p1()
AUTHID CURRENT_USER AUTHID CURRENT_USER
AS DECLARE AS DECLARE begin
begin
null; null;
end; end;
/ /
\sf p2 \sf p2
CREATE OR REPLACE PROCEDURE pkgsch059.p2() CREATE OR REPLACE PROCEDURE pkgsch059.p2()
AUTHID DEFINER AUTHID DEFINER
AS DECLARE AS DECLARE begin
begin
null; null;
end; end;
/ /
\sf p3 \sf p3
CREATE OR REPLACE PROCEDURE pkgsch059.p3() CREATE OR REPLACE PROCEDURE pkgsch059.p3()
AUTHID DEFINER AUTHID DEFINER
AS DECLARE AS DECLARE begin
begin
null; null;
end; end;
/ /

View File

@ -691,7 +691,7 @@ begin
end; end;
/ /
ERROR: argument name "j" used more than once 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 declare
a int := 1; a int := 1;
b int := 1; b int := 1;
@ -701,7 +701,7 @@ begin
end; end;
/ /
ERROR: Named argument "j" can not be a const 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) create or replace function test_para2(col in text, col2 out int)
returns text package as $$ returns text package as $$
declare declare
@ -890,7 +890,7 @@ end pkg2;
call pkg2.f1(5); call pkg2.f1(5);
INFO: the number is 5. INFO: the number is 5.
CONTEXT: SQL statement "CALL syn1.p1(p)" 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 f1
---- ----

View File

@ -453,10 +453,9 @@ pck1.va := vb;
end; end;
/ /
ERROR: "va" is declared CONSTANT ERROR: "va" is declared CONSTANT
LINE 5: pck1.va := vb; LINE 4: pck1.va := vb;
^ ^
QUERY: DECLARE QUERY: DECLARE vb int;
vb int;
begin begin
vb := 2; vb := 2;
pck1.va := vb; pck1.va := vb;
@ -475,10 +474,9 @@ pck1.vb := vb;
end; end;
/ /
ERROR: "pck1.vb" is not a known variable ERROR: "pck1.vb" is not a known variable
LINE 5: pck1.vb := vb; LINE 4: pck1.vb := vb;
^ ^
QUERY: DECLARE QUERY: DECLARE vb int;
vb int;
begin begin
vb := 2; vb := 2;
pck1.vb := vb; pck1.vb := vb;
@ -491,10 +489,9 @@ pck2.vb := vb;
end; end;
/ /
ERROR: "pck2.vb" is not a known variable ERROR: "pck2.vb" is not a known variable
LINE 5: pck2.vb := vb; LINE 4: pck2.vb := vb;
^ ^
QUERY: DECLARE QUERY: DECLARE vb int;
vb int;
begin begin
vb := 2; vb := 2;
pck2.vb := vb; pck2.vb := vb;
@ -1031,7 +1028,7 @@ end pck1;
ERROR: duplicate declaration at or near "va" ERROR: duplicate declaration at or near "va"
LINE 10: va int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1064,7 +1061,7 @@ end pck1;
ERROR: duplicate declaration at or near "vb" ERROR: duplicate declaration at or near "vb"
LINE 10: vb int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1097,7 +1094,7 @@ end pck1;
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 10: r1 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1130,7 +1127,7 @@ end pck1;
ERROR: duplicate declaration at or near "r2" ERROR: duplicate declaration at or near "r2"
LINE 10: r2 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1163,7 +1160,7 @@ end pck1;
ERROR: duplicate declaration at or near "r4" ERROR: duplicate declaration at or near "r4"
LINE 10: r4 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1199,7 +1196,7 @@ end;
ERROR: duplicate declaration at or near "va" ERROR: duplicate declaration at or near "va"
LINE 10: va int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1230,7 +1227,7 @@ end;
ERROR: duplicate declaration at or near "vb" ERROR: duplicate declaration at or near "vb"
LINE 10: vb int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1262,7 +1259,7 @@ end;
ERROR: duplicate declaration at or near "vd" ERROR: duplicate declaration at or near "vd"
LINE 11: vd int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1294,7 +1291,7 @@ end;
ERROR: duplicate declaration at or near "ve" ERROR: duplicate declaration at or near "ve"
LINE 10: ve int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1325,7 +1322,7 @@ end;
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 10: r1 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1356,7 +1353,7 @@ end;
ERROR: duplicate declaration at or near "r2" ERROR: duplicate declaration at or near "r2"
LINE 10: r2 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1387,7 +1384,7 @@ end;
ERROR: duplicate declaration at or near "r3" ERROR: duplicate declaration at or near "r3"
LINE 10: r3 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1418,7 +1415,7 @@ end;
ERROR: duplicate declaration at or near "r4" ERROR: duplicate declaration at or near "r4"
LINE 10: r4 int; 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 r2 is varray(10) of int;
type r3 is table of int; type r3 is table of int;
type r4 is ref cursor; type r4 is ref cursor;
@ -1463,7 +1460,7 @@ end pck1;
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 2: r1 int; LINE 2: r1 int;
^ ^
QUERY: DECLARE va r1; QUERY: DECLARE va r1;
r1 int; r1 int;
begin begin
NULL; NULL;
@ -1480,7 +1477,7 @@ end pck1;
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 2: type r1 is record (a int, b int); 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); type r1 is record (a int, b int);
begin begin
NULL; NULL;
@ -1497,7 +1494,7 @@ end pck1;
ERROR: duplicate declaration at or near "r2" ERROR: duplicate declaration at or near "r2"
LINE 2: r2 int; LINE 2: r2 int;
^ ^
QUERY: DECLARE va r2; QUERY: DECLARE va r2;
r2 int; r2 int;
begin begin
NULL; NULL;
@ -1514,7 +1511,7 @@ end pck1;
ERROR: duplicate declaration at or near "r3" ERROR: duplicate declaration at or near "r3"
LINE 2: r3 int; LINE 2: r3 int;
^ ^
QUERY: DECLARE va r3; QUERY: DECLARE va r3;
r3 int; r3 int;
begin begin
NULL; NULL;
@ -1531,7 +1528,7 @@ end pck1;
ERROR: duplicate declaration at or near "r4" ERROR: duplicate declaration at or near "r4"
LINE 2: r4 int; LINE 2: r4 int;
^ ^
QUERY: DECLARE va r4; QUERY: DECLARE va r4;
r4 int; r4 int;
begin begin
NULL; NULL;
@ -1558,10 +1555,9 @@ end;
end pck1; end pck1;
/ /
ERROR: duplicate declaration at or near "va" ERROR: duplicate declaration at or near "va"
LINE 3: va int; LINE 2: va int;
^ ^
QUERY: DECLARE QUERY: DECLARE vd int := va;
vd int := va;
va int; va int;
begin begin
end end
@ -1574,10 +1570,9 @@ end;
end pck1; end pck1;
/ /
ERROR: duplicate declaration at or near "vb" ERROR: duplicate declaration at or near "vb"
LINE 3: vb int; LINE 2: vb int;
^ ^
QUERY: DECLARE QUERY: DECLARE vd r2 := vb;
vd r2 := vb;
vb int; vb int;
begin begin
end end
@ -1590,10 +1585,9 @@ end;
end pck1; end pck1;
/ /
ERROR: duplicate declaration at or near "vc" ERROR: duplicate declaration at or near "vc"
LINE 3: vc int; LINE 2: vc int;
^ ^
QUERY: DECLARE QUERY: DECLARE vd int := vc;
vd int := vc;
vc int; vc int;
begin begin
end end
@ -1656,10 +1650,9 @@ null;
end; end;
/ /
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 3: r1 r1; LINE 2: r1 r1;
^ ^
QUERY: DECLARE QUERY: DECLARE type r1 is record (a int, b int);
type r1 is record (a int, b int);
r1 r1; r1 r1;
begin begin
null; null;
@ -1672,10 +1665,9 @@ null;
end; end;
/ /
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 3: r1 r1; LINE 2: r1 r1;
^ ^
QUERY: DECLARE QUERY: DECLARE type r1 is varray(10) of int;
type r1 is varray(10) of int;
r1 r1; r1 r1;
begin begin
null; null;
@ -1688,10 +1680,9 @@ null;
end; end;
/ /
ERROR: duplicate declaration at or near "r1" ERROR: duplicate declaration at or near "r1"
LINE 3: r1 r1; LINE 2: r1 r1;
^ ^
QUERY: DECLARE QUERY: DECLARE type r1 is table of int;
type r1 is table of int;
r1 r1; r1 r1;
begin begin
null; null;
@ -1755,7 +1746,7 @@ end pck2;
call pck2.p1(); call pck2.p1();
INFO: 11 INFO: 11
CONTEXT: SQL statement "CALL p2(11)" CONTEXT: SQL statement "CALL p2(11)"
PL/pgSQL function p1() line 3 at PERFORM PL/pgSQL function p1() line 2 at PERFORM
p1 p1
---- ----
@ -1917,7 +1908,7 @@ end pck1;
/ /
ERROR: compile failed when parse the query: (select a,b into v1 from tab1) 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. 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 create or replace package pck1 as
func int; func int;
function func() return int; function func() return int;
@ -2465,7 +2456,7 @@ end;
end pck2; end pck2;
/ /
ERROR: pck1.c1 isn't a cursor 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 create or replace package body pck2 is
procedure p1 as procedure p1 as
type r1 is record (a int, b int); type r1 is record (a int, b int);
@ -2479,7 +2470,7 @@ end;
end pck2; end pck2;
/ /
ERROR: undefined cursor: pck1.c2 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; DROP PACKAGE pck2;
NOTICE: drop cascades to function pkg_val_2.p1() NOTICE: drop cascades to function pkg_val_2.p1()
DROP PACKAGE pck1; DROP PACKAGE pck1;
@ -2664,10 +2655,9 @@ end;
end pck1; end pck1;
/ /
ERROR: cursor referenced by "pkg_val_2.pck1.c1" is not supported yet 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 QUERY: DECLARE va t1;
va t1;
begin begin
open pkg_val_2.pck1.c1; open pkg_val_2.pck1.c1;
close pkg_val_2.pck1.c1; close pkg_val_2.pck1.c1;
@ -2697,10 +2687,9 @@ end;
end pck1; end pck1;
/ /
ERROR: cursor referenced by "pck2.c1" in autonomous procedure is not supported yet 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 QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION;
PRAGMA AUTONOMOUS_TRANSACTION;
va t1; va t1;
begin begin
open pck2.c1; open pck2.c1;
@ -2718,10 +2707,9 @@ end;
end pck1; end pck1;
/ /
ERROR: cursor referenced by "c1" in autonomous procedure is not supported yet ERROR: cursor referenced by "c1" in autonomous procedure is not supported yet
LINE 5: open c1; LINE 4: open c1;
^ ^
QUERY: DECLARE QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION;
PRAGMA AUTONOMOUS_TRANSACTION;
va t1; va t1;
begin begin
open c1; open c1;
@ -2800,9 +2788,9 @@ end pck1;
call pck1.p1(); call pck1.p1();
ERROR: ERROR: package cursor referenced in autonomous procedure is not supported yet 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 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()" SQL statement "CALL p2()"
PL/pgSQL function p1() line 4 at PERFORM PL/pgSQL function p1() line 3 at PERFORM
referenced column: p1 referenced column: p1
DROP PACKAGE pck1; 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 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 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 table check_tab1(a int);
create or replace function check_f04 return int as create or replace function check_f04 return int as
declare declare
@ -2864,7 +2852,7 @@ end;
/ /
ERROR: compile failed when parse the query: select c3 from check_tab1 order by c3 limit 6 ERROR: compile failed when parse the query: select c3 from check_tab1 order by c3 limit 6
DETAIL: column "c3" does not exist 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; drop table check_tab1;
reset behavior_compat_options; reset behavior_compat_options;
-- ref package cursor attr at first -- ref package cursor attr at first
@ -2974,13 +2962,13 @@ INFO: isopend: t
INFO: rowcount: 1 INFO: rowcount: 1
INFO: va:(3,4) INFO: va:(3,4)
CONTEXT: SQL statement "CALL pp1()" CONTEXT: SQL statement "CALL pp1()"
PL/pgSQL function p1() line 12 at PERFORM PL/pgSQL function p1() line 11 at PERFORM
INFO: isopend: t INFO: isopend: t
CONTEXT: SQL statement "CALL pp1()" CONTEXT: SQL statement "CALL pp1()"
PL/pgSQL function p1() line 12 at PERFORM PL/pgSQL function p1() line 11 at PERFORM
INFO: rowcount: 2 INFO: rowcount: 2
CONTEXT: SQL statement "CALL pp1()" CONTEXT: SQL statement "CALL pp1()"
PL/pgSQL function p1() line 12 at PERFORM PL/pgSQL function p1() line 11 at PERFORM
p1 p1
---- ----
@ -2994,11 +2982,10 @@ fetch pck1.c1 into va;
end; end;
/ /
ERROR: package cursor with arguments is only supported to be opened in the same package. 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" DETAIL: cursor "pck1.c1" is only supported to be opened in the package "pck1"
QUERY: DECLARE QUERY: DECLARE va t1;
va t1;
begin begin
open pck1.c1(4); open pck1.c1(4);
fetch pck1.c1 into va; fetch pck1.c1 into va;
@ -3057,10 +3044,10 @@ end;
/ /
INFO: before auto: hahahah,(1,cccc) INFO: before auto: hahahah,(1,cccc)
CONTEXT: SQL statement "CALL p1(150,pck1.va,pck1.vc)" 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) INFO: after auto: hahahah,(1,cccc)
CONTEXT: SQL statement "CALL p1(150,pck1.va,pck1.vc)" 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) INFO: after p1: bbbbbbb,(123,ayayayayay)
drop procedure p1; drop procedure p1;

View File

@ -376,7 +376,7 @@ end;
ERROR: invalid type name "va.c%TYPE" ERROR: invalid type name "va.c%TYPE"
LINE 3: vc va.c%TYPE; LINE 3: vc va.c%TYPE;
^ ^
QUERY: DECLARE va foo%ROWTYPE; QUERY: DECLARE va foo%ROWTYPE;
vb va.b%TYPE; vb va.b%TYPE;
vc va.c%TYPE; vc va.c%TYPE;
begin begin
@ -580,10 +580,10 @@ end pckg_test;
call synonym_user_2.pckg_test.proc_test1(); call synonym_user_2.pckg_test.proc_test1();
INFO: test procedure INFO: test procedure
CONTEXT: SQL statement "CALL proc_test()" 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 INFO: test package procedure
CONTEXT: SQL statement "CALL pckg_test1.proc_test2()" 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 proc_test1
------------ ------------
@ -851,7 +851,7 @@ raise info '%',vb;
end; end;
/ /
ERROR: relation "va" does not exist when parse word. 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 -- (2) in package
create or replace package pck1 is create or replace package pck1 is
va test1%ROWTYPE; va test1%ROWTYPE;

View File

@ -23,7 +23,7 @@ ERROR: missing "DML" at end of SQL expression
LINE 3: CREATE ROLE jonathan PASSWORD '********' LOGIN; LINE 3: CREATE ROLE jonathan PASSWORD '********' LOGIN;
^ ^
QUERY: DECLARE QUERY: DECLARE
BEGIN forall i in 1..iter BEGIN forall i in 1..iter
CREATE ROLE jonathan PASSWORD '********' LOGIN; CREATE ROLE jonathan PASSWORD '********' LOGIN;
end end
CREATE PROCEDURE test_proc_define CREATE PROCEDURE test_proc_define
@ -811,5 +811,107 @@ drop procedure p_definer;
drop procedure p_caller; drop procedure p_caller;
drop table test_emp_001; drop table test_emp_001;
drop procedure test_proc_using_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; \c regression;
drop database IF EXISTS pl_test_pkg_define; drop database IF EXISTS pl_test_pkg_define;

View File

@ -19,7 +19,7 @@ end;
ERROR: syntax error at or near "exit" ERROR: syntax error at or near "exit"
LINE 3: declare exit handler for 22012 LINE 3: declare exit handler for 22012
^ ^
QUERY: DECLARE a int; QUERY: DECLARE a int;
begin begin
declare exit handler for 22012 declare exit handler for 22012
begin begin
@ -113,7 +113,7 @@ end;
WARNING: Please carefully use independent user as it need more self-management. WARNING: Please carefully use independent user as it need more self-management.
HINT: Self-management include logical backup, password manage and so on. HINT: Self-management include logical backup, password manage and so on.
CONTEXT: SQL statement "CREATE USER pri_user_independent WITH INDEPENDENT IDENTIFIED BY "********"" 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 declare
begin begin
declare exit handler for "sqlwarning" declare exit handler for "sqlwarning"
@ -414,17 +414,17 @@ NOTICE: SQLSTATE = 22012
INFO: zero error INFO: zero error
CONTEXT: referenced column: proc1 CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)" 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 INFO: b1 is zero
NOTICE: SQLSTATE = 0A000 NOTICE: SQLSTATE = 0A000
INFO: emmm.... INFO: emmm....
CONTEXT: referenced column: proc1 CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)" 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 INFO: result: 0
CONTEXT: referenced column: proc2 CONTEXT: referenced column: proc2
SQL statement "SELECT proc2(b1, a1)" 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 INFO: END
proc3 proc3
------- -------
@ -436,21 +436,21 @@ NOTICE: SQLSTATE = 22012
INFO: zero error INFO: zero error
CONTEXT: referenced column: proc1 CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)" 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 INFO: b1 is zero
NOTICE: SQLSTATE = 0A000 NOTICE: SQLSTATE = 0A000
INFO: emmm.... INFO: emmm....
CONTEXT: referenced column: proc1 CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)" 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 NOTICE: SQLSTATE = 22012
CONTEXT: referenced column: proc2 CONTEXT: referenced column: proc2
SQL statement "SELECT proc2(b1, a1)" 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 INFO: result: 0
CONTEXT: referenced column: proc2 CONTEXT: referenced column: proc2
SQL statement "SELECT proc2(b1, a1)" 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 INFO: END
proc3 proc3
------- -------

View File

@ -275,7 +275,7 @@ end;
ERROR: duplicate declaration at or near "c1_all" ERROR: duplicate declaration at or near "c1_all"
LINE 8: declare c1_all cursor is --cursor without args 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_loc varchar(100);
company_no integer; company_no integer;
@ -400,10 +400,9 @@ exception
END; END;
/ /
ERROR: duplicate declaration at or near "DIVISION_ZERO" 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: QUERY: declare
declare
a int; a int;
BEGIN BEGIN
declare DIVISION_ZERO condition for SQLSTATE '22012'; declare DIVISION_ZERO condition for SQLSTATE '22012';
@ -437,7 +436,7 @@ BEGIN
END; END;
/ /
ERROR: Incorrect CONDITION value: '0' 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' -- declare condition sqlstate begin with '00'
create or replace procedure test_condition_6 as create or replace procedure test_condition_6 as
BEGIN BEGIN
@ -446,7 +445,7 @@ BEGIN
END; END;
/ /
ERROR: bad SQLSTATE '00000' 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 create or replace procedure test_condition_1 as
declare declare
a int; a int;
@ -508,10 +507,9 @@ exception
END; END;
/ /
ERROR: syntax error at or near "SQLSTATE" 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: QUERY: declare
declare
a int; a int;
BEGIN BEGIN
declare DIVISION_ZERO condition for SQLSTATE '22012'; declare DIVISION_ZERO condition for SQLSTATE '22012';

View File

@ -1166,7 +1166,7 @@ raise info 'res is:%',res;
end; end;
/ /
ERROR: when invoking function f1, no destination for argments "" 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; drop function f1;
create or replace package pck1 is create or replace package pck1 is
type tp1 is record(v01 number, v03 varchar2, v02 number); type tp1 is record(v01 number, v03 varchar2, v02 number);

View File

@ -420,25 +420,25 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info; 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) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------- -------------+--------+-------------
test_debug2 | 4 | commit; test_debug2 | 3 | commit;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.step(); select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------------------------------ -------------+--------+------------------------------------
test_debug2 | 5 | insert into tb1 values (2000); test_debug2 | 4 | insert into tb1 values (2000);
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------- -------------+--------+---------------
test_debug2 | 6 | rollback; test_debug2 | 5 | rollback;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); 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; select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.* --?.*
--?.* --?.*
--? (.*,test_debug3,5," CASE a") --? (.*,test_debug3,4," CASE a")
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+----------------------- -------------+--------+-----------------------
test_debug3 | 7 | b := 111; test_debug3 | 6 | b := 111;
(1 row) (1 row)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();
@ -476,19 +476,19 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+-------------------------------------------- -------------+--------+--------------------------------------------
test_debug3 | 11 | raise info 'pi_return : %',pi_return ; test_debug3 | 10 | raise info 'pi_return : %',pi_return ;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------------- -------------+--------+-------------------
test_debug3 | 14 | b := 101; test_debug3 | 13 | b := 101;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------- -------------+--------+---------------
test_debug3 | 15 | return b; test_debug3 | 14 | return b;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.continue(); 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; select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.* --?.*
--?.* --?.*
--? (.*,test_debug4,5," CASE a") --? (.*,test_debug4,4," CASE a")
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.step(); select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query funcname | lineno | query
-------------+--------+----------------------- -------------+--------+-----------------------
test_debug4 | 7 | b := 111; test_debug4 | 6 | b := 111;
(1 row) (1 row)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();
@ -529,7 +529,7 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.step(); select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------------------------- -------------+--------+---------------------------------
test_debug4 | 8 | call test_debug(a); test_debug4 | 7 | call test_debug(a);
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.step(); 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(); select funcname, lineno, query from dbe_pldebugger.continue();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------------- -------------+--------+-------------------
test_debug4 | 15 | b := 101; test_debug4 | 14 | b := 101;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.continue(); 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; select dbe_pldebugger.attach(nodename, port) from debug_info;
attach attach
------------------------------------ ------------------------------------
--? (.*,test_debug4,5," CASE a") --? (.*,test_debug4,4," CASE a")
(1 row) (1 row)
SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step(); SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step();
funcname | lineno | query funcname | lineno | query
-------------+--------+----------------------- -------------+--------+-----------------------
test_debug4 | 7 | b := 111; test_debug4 | 6 | b := 111;
(1 row) (1 row)
SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step(); SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------------------------- -------------+--------+---------------------------------
test_debug4 | 8 | call test_debug(a); test_debug4 | 7 | call test_debug(a);
(1 row) (1 row)
SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step(); 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; select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.* --?.*
--?.* --?.*
--? (.*,test_debug4,5," CASE a") --? (.*,test_debug4,4," CASE a")
(1 row) (1 row)
truncate tmp_holder; truncate tmp_holder;
@ -658,7 +658,7 @@ select * from tmp_holder;
2 2
0:31: SELECT b FROM test where a = 7 INTO b_tmp; 0:31: SELECT b FROM test where a = 7 INTO b_tmp;
1:44: RAISE INFO 'cnt is %', cnt; 1:44: RAISE INFO 'cnt is %', cnt;
2:12: return b; 2:12: raise info 'pi_return : %',pi_return ;
(6 rows) (6 rows)
select funcname, lineno, query from dbe_pldebugger.continue(); 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 frameno | funcname | lineno | query
---------+-------------+--------+------------------------------------------------ ---------+-------------+--------+------------------------------------------------
0 | test_debug | 31 | SELECT b FROM test where a = 7 INTO b_tmp; 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) (2 rows)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();
@ -748,7 +748,7 @@ select frameno, funcname, lineno, query from dbe_pldebugger.backtrace();
frameno | funcname | lineno | query frameno | funcname | lineno | query
---------+-------------+--------+--------------------------------- ---------+-------------+--------+---------------------------------
0 | test_debug | 44 | RAISE INFO 'cnt is %', cnt; 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) (2 rows)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();
@ -799,31 +799,31 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info; select dbe_pldebugger.attach(nodename, port) from debug_info;
attach attach
------------------------------------ ------------------------------------
--? (.*,test_debug4,5," CASE a") --? (.*,test_debug4,4," CASE a")
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+----------------------- -------------+--------+-----------------------
test_debug4 | 7 | b := 111; test_debug4 | 6 | b := 111;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------------------------- -------------+--------+---------------------------------
test_debug4 | 8 | call test_debug(a); test_debug4 | 7 | call test_debug(a);
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------------- -------------+--------+-------------------
test_debug4 | 15 | b := 101; test_debug4 | 14 | b := 101;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.step(); select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------- -------------+--------+---------------
test_debug4 | 16 | return b; test_debug4 | 15 | return b;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.finish(); 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; select dbe_pldebugger.attach(nodename, port) from debug_info;
attach attach
------------------------------------ ------------------------------------
--? (.*,test_debug4,5," CASE a") --? (.*,test_debug4,4," CASE a")
(1 row) (1 row)
truncate tmp_holder; truncate tmp_holder;
@ -874,7 +874,7 @@ select funcname, lineno, query from dbe_pldebugger.finish();
select funcname, lineno, query from dbe_pldebugger.finish(); select funcname, lineno, query from dbe_pldebugger.finish();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------------- -------------+--------+-------------------
test_debug4 | 15 | b := 101; test_debug4 | 14 | b := 101;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.finish(); 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; 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) (1 row)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();
@ -1171,13 +1171,13 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+------------- -------------+--------+-------------
test_setvar | 16 | COMMIT; test_setvar | 15 | COMMIT;
(1 row) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query 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) (1 row)
-- immutable to sql injection -- immutable to sql injection
@ -1352,13 +1352,13 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query 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) (1 row)
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query funcname | lineno | query
-------------+--------+--------------- -------------+--------+---------------
test_setvar | 20 | ROLLBACK; test_setvar | 19 | ROLLBACK;
(1 row) (1 row)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();
@ -1387,7 +1387,7 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next(); select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query 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) (1 row)
select * from dbe_pldebugger.info_locals(); select * from dbe_pldebugger.info_locals();

View File

@ -379,7 +379,7 @@ select * from debug_info;
select * from test_debug4(1); select * from test_debug4(1);
INFO: cnt is 3 INFO: cnt is 3
CONTEXT: SQL statement "call test_debug(a)" 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 test_debug4
------------- -------------
101 101
@ -388,12 +388,12 @@ PL/pgSQL function test_debug4(integer) line 8 at SQL statement
-- test with client error in exception -- test with client error in exception
select * from test_debug4(1); select * from test_debug4(1);
ERROR: receive abort message 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 -- test with breakpoint
select * from test_debug4(1); select * from test_debug4(1);
INFO: cnt is 3 INFO: cnt is 3
CONTEXT: SQL statement "call test_debug(a)" 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 test_debug4
------------- -------------
101 101
@ -403,7 +403,7 @@ PL/pgSQL function test_debug4(integer) line 8 at SQL statement
select * from test_debug4(1); select * from test_debug4(1);
INFO: cnt is 3 INFO: cnt is 3
CONTEXT: SQL statement "call test_debug(a)" 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 test_debug4
------------- -------------
101 101

View File

@ -51,6 +51,6 @@ end;
/ /
NOTICE: table "t_ustore_proc_temp_table_0008" does not exist, skipping 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" 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)" 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

View File

@ -59,15 +59,14 @@ insert into fasd af asd asdf;
end; end;
/ /
NOTICE: syntax error at or near "af" 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 QUERY: DECLARE begin
begin
insert into fasd af asd asdf; insert into fasd af asd asdf;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A DETAIL: N/A
CONTEXT: compilation of PL/pgSQL function "func1" near line 2 CONTEXT: compilation of PL/pgSQL function "func1" near line 1
-- package -- package
CREATE OR REPLACE PACKAGE emp_bonus9 AS CREATE OR REPLACE PACKAGE emp_bonus9 AS
da int; da int;
@ -91,11 +90,10 @@ END;
END emp_bonus9; END emp_bonus9;
/ /
NOTICE: syntax error at or near "int" when compile function aa(integer,character varying) 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 DETAIL: syntax error
QUERY: DECLARE QUERY: DECLARE BEGIN
BEGIN
insert int aa aa; insert int aa aa;
END END
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
@ -201,15 +199,14 @@ insert into fasd af asd asdf;
end; end;
/ /
NOTICE: syntax error at or near "af" 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 QUERY: DECLARE begin
begin
insert into fasd af asd asdf; insert into fasd af asd asdf;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A 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 role gs_developper password 'Dev@9999';
set behavior_compat_options='allow_procedure_compile_check'; set behavior_compat_options='allow_procedure_compile_check';
-- [no log] trigger func -- [no log] trigger func
@ -249,11 +246,10 @@ begin
end; end;
/ /
NOTICE: unrecognized row security option "whatever" 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. HINT: Only PERMISSIVE or RESTRICTIVE policies are supported currently.
QUERY: DECLARE QUERY: DECLARE begin
begin
CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER
USING (dlevel <= (SELECT aid FROM account_row WHERE aname = current_user)); USING (dlevel <= (SELECT aid FROM account_row WHERE aname = current_user));
insert int asd asd; insert int asd asd;
@ -261,11 +257,10 @@ begin
insert int asd asd; insert int asd asd;
end end
ERROR: relation "account_row" does not exist 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: DETAIL:
QUERY: DECLARE QUERY: DECLARE begin
begin
CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER CREATE ROW LEVEL SECURITY POLICY p02 ON document_row AS WHATEVER
USING (dlevel <= (SELECT aid FROM account_row WHERE aname = current_user)); USING (dlevel <= (SELECT aid FROM account_row WHERE aname = current_user));
insert int asd asd; insert int asd asd;
@ -378,7 +373,7 @@ begin
end; end;
/ /
ERROR: column "pro70" has pseudo-type void 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[] create or replace function bulk_f_039_1() returns int[]
LANGUAGE plpgsql AS LANGUAGE plpgsql AS
$$ $$
@ -398,19 +393,17 @@ open v_cur for select c1,c2 from tab1;
end; end;
/ /
NOTICE: "v_cur" is not a known variable 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 QUERY: DECLARE type tpc1 is ref cursor;
type tpc1 is ref cursor;
--v_cur tpc1; --v_cur tpc1;
begin begin
open v_cur for select c1,c2 from tab1; open v_cur for select c1,c2 from tab1;
end end
ERROR: open cursor error 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 QUERY: DECLARE type tpc1 is ref cursor;
type tpc1 is ref cursor;
--v_cur tpc1; --v_cur tpc1;
begin begin
open v_cur for select c1,c2 from tab1; open v_cur for select c1,c2 from tab1;
@ -497,15 +490,14 @@ insert int a;
end; end;
/ /
NOTICE: syntax error at or near "int" NOTICE: syntax error at or near "int"
LINE 3: insert int a; LINE 2: insert int a;
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
insert int a; insert int a;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A 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 create or replace package pkg4
is is
a a; a a;
@ -665,10 +657,9 @@ insert int a;
end; end;
/ /
ERROR: syntax error at or near "int" ERROR: syntax error at or near "int"
LINE 5: insert int a; LINE 4: insert int a;
^ ^
QUERY: DECLARE QUERY: DECLARE b int;
b int;
c int; c int;
begin begin
insert int a; insert int a;
@ -814,10 +805,9 @@ insert int a;
end; end;
/ /
ERROR: syntax error at or near "int" ERROR: syntax error at or near "int"
LINE 5: insert int a; LINE 4: insert int a;
^ ^
QUERY: DECLARE QUERY: DECLARE b int;
b int;
c int; c int;
begin begin
insert int a; insert int a;

View File

@ -286,10 +286,9 @@ select 1,'a','b' into va,vb vc;
end; end;
/ /
ERROR: syntax error, expected "," 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 QUERY: DECLARE va int;
va int;
vb varchar2; vb varchar2;
vc varchar2; vc varchar2;
begin begin

View File

@ -188,7 +188,7 @@ end pck3;
call pck3.ppp1(); call pck3.ppp1();
INFO: a INFO: a
CONTEXT: SQL statement "CALL ppp2(var1)" CONTEXT: SQL statement "CALL ppp2(var1)"
PL/pgSQL function ppp1() line 7 at PERFORM PL/pgSQL function ppp1() line 6 at PERFORM
INFO: a INFO: a
ppp1 ppp1
------ ------
@ -597,7 +597,7 @@ end;
/ /
call pro_cs_trans_1(); 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 create or replace procedure pro_cs_trans_1() as
cursor c1 is select * from cs_trans_1 order by 1; cursor c1 is select * from cs_trans_1 order by 1;
rec_1 cs_trans_1%rowtype; rec_1 cs_trans_1%rowtype;
@ -613,7 +613,7 @@ end;
/ /
call pro_cs_trans_1(); 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 create or replace procedure pro_cs_trans_1() as
cursor c1 is select * from cs_trans_1 order by 1; cursor c1 is select * from cs_trans_1 order by 1;
rec_1 cs_trans_1%rowtype; rec_1 cs_trans_1%rowtype;

View File

@ -674,7 +674,7 @@ end;
call proc15(); call proc15();
ERROR: schema "rec" does not exist ERROR: schema "rec" does not exist
CONTEXT: SQL statement "CALL proc1(rec.c_info.id,1)" 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() create or replace procedure proc15()
is is
rec record; rec record;
@ -686,11 +686,11 @@ end loop;
end; end;
/ /
ERROR: when invoking function proc1, no destination for argments "a1" 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(); call proc15();
ERROR: schema "rec" does not exist ERROR: schema "rec" does not exist
CONTEXT: SQL statement "CALL proc1(rec.c_info.id,1)" 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) create or replace procedure proc16(a1 in out varchar)
is is
begin begin
@ -913,7 +913,7 @@ end;
call proc3(); call proc3();
INFO: <NULL> INFO: <NULL>
CONTEXT: SQL statement "CALL proc1(a2[1],a2[2])" 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: a2:{10000,20000}
INFO: a1:1 INFO: a1:1
proc3 proc3
@ -938,7 +938,7 @@ end;
call proc3(); call proc3();
INFO: <NULL> INFO: <NULL>
CONTEXT: SQL statement "CALL proc1(c1=>a2[1],c2=>a2[2])" 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: a2:{10000,20000}
INFO: a1:1 INFO: a1:1
proc3 proc3
@ -1068,11 +1068,11 @@ end;
call proc3(); call proc3();
INFO: a1:10000 INFO: a1:10000
CONTEXT: SQL statement "CALL proc1(a2[1])" 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: a2:{10000}
INFO: a1:10000 INFO: a1:10000
CONTEXT: SQL statement "CALL proc1(a1)" 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 INFO: a1:10000
proc3 proc3
------- -------
@ -1095,11 +1095,11 @@ end;
call proc3(); call proc3();
INFO: a1:10000 INFO: a1:10000
CONTEXT: SQL statement "CALL proc1(a1=>a2[1])" 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: a2:{10000}
INFO: a1:10000 INFO: a1:10000
CONTEXT: SQL statement "CALL proc1(a1=>a1)" 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 INFO: a1:10000
proc3 proc3
------- -------
@ -1122,11 +1122,11 @@ end;
call proc3(); call proc3();
INFO: a1:10000 INFO: a1:10000
CONTEXT: SQL statement "CALL proc1(a2[1])" 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: a2:{10000}
INFO: a1:10000 INFO: a1:10000
CONTEXT: SQL statement "CALL proc1(a1)" 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 INFO: a1:10000
proc3 proc3
------- -------
@ -1209,7 +1209,7 @@ end;
call p2(); call p2();
INFO: 12 INFO: 12
CONTEXT: SQL statement "CALL p1(c1=>'12',c2=>a)" 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} INFO: {1,2}
p2 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)" CONTEXT: SQL statement "CALL pp11(v121=>v01.v01,v122=>v122)"
--?.* --?.*
SQL statement "CALL pck5.pp11(v01)" 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 referenced column: fun1
NOTICE: v01 : 2 NOTICE: v01 : 2
CONTEXT: SQL statement "CALL pck5.pp11(v01)" 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 referenced column: fun1
fun1 fun1
------ ------
@ -1300,11 +1300,11 @@ NOTICE: others :relation "test_tb1" does not exist on datanode1
CONTEXT: SQL statement "CALL pp11(v01.v01,v122)" CONTEXT: SQL statement "CALL pp11(v01.v01,v122)"
--?.* --?.*
SQL statement "CALL pck5.pp11(v01)" 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 referenced column: fun1
NOTICE: v01 : 2 NOTICE: v01 : 2
CONTEXT: SQL statement "CALL pck5.pp11(v01)" 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 referenced column: fun1
fun1 fun1
------ ------
@ -1362,7 +1362,7 @@ end;
/ /
NOTICE: v_out : (1,1,a,b,c) NOTICE: v_out : (1,1,a,b,c)
CONTEXT: SQL statement "CALL pck8.pp11('a','b',va)" 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; drop package pck5;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function plpgsql_inout.pp11() DETAIL: drop cascades to function plpgsql_inout.pp11()
@ -1394,7 +1394,7 @@ pp1(vd=>v1, va=>v1, vb=>v1);
end; end;
/ /
ERROR: when invoking function pp1, no argments match "vd" 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; drop procedure pp1;
-- two out param, one is valid (should error) -- two out param, one is valid (should error)
drop package if exists pck1; drop package if exists pck1;
@ -1420,7 +1420,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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; drop package pck1;
NOTICE: drop cascades to function plpgsql_inout.p1() NOTICE: drop cascades to function plpgsql_inout.p1()
-- two out param, one is valid, overload situation (should error) -- 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: tbcor2.count is 2
INFO: 2 parameter col5 is 2 INFO: 2 parameter col5 is 2
CONTEXT: SQL statement "CALL proc070_1(tbcor2,ARRAY_INDEXBY_LENGTH("tbcor2", 1 ) )" 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 ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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; drop package pkg070;
NOTICE: drop cascades to 3 other objects NOTICE: drop cascades to 3 other objects
DETAIL: drop cascades to function plpgsql_inout.proc070_1() DETAIL: drop cascades to function plpgsql_inout.proc070_1()
@ -1506,7 +1506,7 @@ pp1(a=>var1,b=>3);
end; end;
/ /
ERROR: when invoking function pp1, no destination for argments "b" 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; drop procedure pp1;
-- test one in row, one out shcalar -- test one in row, one out shcalar
-- 1 -- 1
@ -1543,7 +1543,7 @@ end;
/ /
INFO: b:2 INFO: b:2
CONTEXT: SQL statement "CALL pck1.p1(var1,var)" 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 INFO: var:2
drop package if exists pck1; drop package if exists pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
@ -1585,10 +1585,10 @@ end;
/ /
INFO: b:3 INFO: b:3
CONTEXT: SQL statement "CALL pck1.p1(var1,var)" 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 INFO: b2:2
CONTEXT: SQL statement "CALL pck1.p1(var2,varr)" 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 INFO: var:3
drop package if exists pck1; drop package if exists pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
@ -1667,7 +1667,7 @@ end;
/ /
INFO: b2:3 INFO: b2:3
CONTEXT: SQL statement "CALL pck1.p1(a2=>array[1,3],b2=>var)" 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 INFO: var:3
drop package pck1; drop package pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
@ -1706,7 +1706,7 @@ pck3.p1(a2=>(1,2,3)::pck2.tp_1);
end; end;
/ /
ERROR: Named argument "a2" can not be a const 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; drop package pck3;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function plpgsql_inout.p1() DETAIL: drop cascades to function plpgsql_inout.p1()
@ -1736,7 +1736,7 @@ raise info 'var:%',var;
end; end;
/ /
ERROR: when invoking function pck1.p1, no destination for argments "c" 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; drop package pck1;
NOTICE: drop cascades to function plpgsql_inout.p1(integer,character varying) NOTICE: drop cascades to function plpgsql_inout.p1(integer,character varying)
-- b. function no assign -- b. function no assign
@ -1790,7 +1790,7 @@ end;
INFO: c:{3} INFO: c:{3}
CONTEXT: referenced column: f1 CONTEXT: referenced column: f1
SQL statement "SELECT pck1.f1(a => x,c=> pck1.va)" 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: res:10
INFO: z:<NULL> INFO: z:<NULL>
declare declare
@ -1806,7 +1806,7 @@ end;
INFO: c:<NULL> INFO: c:<NULL>
CONTEXT: referenced column: f1 CONTEXT: referenced column: f1
SQL statement "SELECT pck1.f1(a => x,c=> z)" 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: res:10
INFO: z:<NULL> INFO: z:<NULL>
drop package pck1; drop package pck1;

View File

@ -556,10 +556,10 @@ end;
/ /
INFO: b:1 INFO: b:1
CONTEXT: SQL statement "CALL pck1.p1((1,'b',2),'a')" 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 ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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; drop table if exists test_tb;
NOTICE: table "test_tb" does not exist, skipping NOTICE: table "test_tb" does not exist, skipping
create table test_tb(c1 int,c2 varchar2); create table test_tb(c1 int,c2 varchar2);
@ -855,7 +855,7 @@ raise info 'aa=%',aa;
end; end;
/ /
ERROR: when invoking function p11, no destination for argments num "a" 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); drop procedure if exists p112(out int);
NOTICE: function p112(pg_catalog.int4) does not exist, skipping NOTICE: function p112(pg_catalog.int4) does not exist, skipping
create procedure p112(a out int) is create procedure p112(a out int) is
@ -868,7 +868,7 @@ raise info 'aa=%',aa;
end; end;
/ /
ERROR: when invoking function p11, no destination for argments num "a" 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); drop procedure if exists p112(out int);
NOTICE: function p112(pg_catalog.int4) does not exist, skipping NOTICE: function p112(pg_catalog.int4) does not exist, skipping
create procedure p112(a out int) is create procedure p112(a out int) is
@ -881,7 +881,7 @@ raise info 'aa=%',aa;
end; end;
/ /
ERROR: when invoking function p11, no destination for argments num "a" 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); drop procedure if exists p112(out int);
NOTICE: function p112(pg_catalog.int4) does not exist, skipping NOTICE: function p112(pg_catalog.int4) does not exist, skipping
create procedure p112(a out int) is create procedure p112(a out int) is
@ -894,7 +894,7 @@ raise info 'aa=%',aa;
end; end;
/ /
ERROR: when invoking function p11, no destination for argments num "a" 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); drop procedure if exists p112(out int);
NOTICE: function p112(pg_catalog.int4) does not exist, skipping NOTICE: function p112(pg_catalog.int4) does not exist, skipping
create procedure p112(a out int) is create procedure p112(a out int) is
@ -927,7 +927,7 @@ raise info 'aa=%',aa;
end; end;
/ /
ERROR: when invoking function p11, no destination for argments num "a" 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; drop package if exists pck1;
NOTICE: package pck1() does not exist, skipping NOTICE: package pck1() does not exist, skipping
create or replace package pck1 is create or replace package pck1 is
@ -955,7 +955,7 @@ end;
/ /
ERROR: query has no destination for result data ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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; drop package if exists pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function plpgsql_override_out.p1() DETAIL: drop cascades to function plpgsql_override_out.p1()
@ -991,10 +991,10 @@ end;
/ /
INFO: b:bb INFO: b:bb
CONTEXT: SQL statement "CALL pck1.p1((1,'bb','11'),array[2,3,4],var2)" 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 ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead. 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 declare
var1 pck1.tp_2; var1 pck1.tp_2;
var2 varchar2; var2 varchar2;
@ -1003,7 +1003,7 @@ perform pck1.p1(a=>(1,'bb','11'),c=>var1,b=>'aa');--报错
end; end;
/ /
ERROR: Named argument "b" can not be a const 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=''; set plsql_compile_check_options='';
drop package if exists pck1; drop package if exists pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects

View File

@ -263,10 +263,9 @@ end;
end test_cur2; end test_cur2;
/ /
ERROR: "cur1.a.a" is not a known variable ERROR: "cur1.a.a" is not a known variable
LINE 3: cur1.a.a:=2; LINE 2: cur1.a.a:=2;
^ ^
QUERY: DECLARE QUERY: DECLARE BEGIN
BEGIN
cur1.a.a:=2; cur1.a.a:=2;
end end
create or replace package test_cur3 create or replace package test_cur3
@ -290,10 +289,9 @@ end;
end test_cur3; end test_cur3;
/ /
ERROR: "cur1.a.a" is not a known variable ERROR: "cur1.a.a" is not a known variable
LINE 3: cur1.a.a:=2; LINE 2: cur1.a.a:=2;
^ ^
QUERY: DECLARE QUERY: DECLARE BEGIN
BEGIN
cur1.a.a:=2; cur1.a.a:=2;
end end
create or replace package test_cur4 create or replace package test_cur4
@ -318,10 +316,9 @@ end;
end test_cur4; end test_cur4;
/ /
ERROR: "cur1.a.a" is not a known variable ERROR: "cur1.a.a" is not a known variable
LINE 3: cur1.a.a:=2; LINE 2: cur1.a.a:=2;
^ ^
QUERY: DECLARE QUERY: DECLARE BEGIN
BEGIN
cur1.a.a:=2; cur1.a.a:=2;
cur.a.a:=2; cur.a.a:=2;
end end
@ -449,7 +446,7 @@ end;
/ /
ERROR: array type nested by array is not supported yet. ERROR: array type nested by array is not supported yet.
DETAIL: Define array type "t2" of 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 -- 2. table nest array
create or replace package pck1 as create or replace package pck1 as
type t1 is varray(10) of int; type t1 is varray(10) of int;
@ -468,7 +465,7 @@ end;
/ /
ERROR: array type nested by table type is not supported yet. ERROR: array type nested by table type is not supported yet.
DETAIL: Define table type "t2" of array 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 -- 3. array nest table
create or replace package pck1 as create or replace package pck1 as
type t1 is table of int; type t1 is table of int;
@ -487,7 +484,7 @@ end;
/ /
ERROR: table type nested by array is not supported yet. ERROR: table type nested by array is not supported yet.
DETAIL: Define array type "t2" of table type 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 -- 4. table nest table, will be supported soon
-- create or replace package pck1 as -- create or replace package pck1 as
-- type t1 is table of int; -- type t1 is table of int;
@ -521,7 +518,7 @@ end;
/ /
ERROR: ref cursor type nested by record is not supported yet. ERROR: ref cursor type nested by record is not supported yet.
DETAIL: Define a record type of ref cursor type 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 -- 6. table nest ref cursor
create or replace package pck1 as create or replace package pck1 as
type t1 is ref cursor; type t1 is ref cursor;
@ -540,7 +537,7 @@ end;
/ /
ERROR: ref cursor type nested by table type is not supported yet. ERROR: ref cursor type nested by table type is not supported yet.
DETAIL: Define table type "t2" of ref cursor 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 -- 7. varray nest ref cursor
create or replace package pck1 as create or replace package pck1 as
type t1 is ref cursor; type t1 is ref cursor;
@ -559,7 +556,7 @@ end;
/ /
ERROR: ref cursor type nested by array is not supported yet. ERROR: ref cursor type nested by array is not supported yet.
DETAIL: Define array type "t2" of ref cursor type 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; DROP package pck1;
ERROR: package pck1 does not exist ERROR: package pck1 does not exist
DROP function func1(); DROP function func1();
@ -721,10 +718,10 @@ end pck1;
call pck1.p1(); call pck1.p1();
INFO: (1,2) INFO: (1,2)
CONTEXT: SQL statement "CALL p2(va)" 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) INFO: (4,5)
CONTEXT: SQL statement "CALL p2(va)" CONTEXT: SQL statement "CALL p2(va)"
PL/pgSQL function p1() line 7 at PERFORM PL/pgSQL function p1() line 6 at PERFORM
p1 p1
---- ----
@ -833,9 +830,9 @@ call pck1.p1();
INFO: (1,2) INFO: (1,2)
INFO: (,) INFO: (,)
CONTEXT: SQL statement "CALL p2(vb)" 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. 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; DROP PACKAGE pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function plpgsql_packagetype2.p1() DETAIL: drop cascades to function plpgsql_packagetype2.p1()
@ -870,9 +867,9 @@ call pck1.p1();
INFO: (1,2) INFO: (1,2)
INFO: (,) INFO: (,)
CONTEXT: SQL statement "CALL p2(vb)" 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. 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; DROP PACKAGE pck1;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to function plpgsql_packagetype2.p1() DETAIL: drop cascades to function plpgsql_packagetype2.p1()
@ -907,7 +904,7 @@ call pck1.p1();
INFO: (1,2) INFO: (1,2)
--?.* --?.*
CONTEXT: SQL statement "CALL p2(vb)" 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) INFO: (1,2)
p1 p1
---- ----
@ -1022,7 +1019,7 @@ call p1();
ERROR: type "pck1.r1" is not supported as column type ERROR: type "pck1.r1" is not supported as column type
DETAIL: "pck1.r1" is a package or procedure type DETAIL: "pck1.r1" is a package or procedure type
CONTEXT: SQL statement "create table t1(a pck1.r1)" 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 create or replace procedure p1 as
begin begin
create table t1(a pck1.r2); create table t1(a pck1.r2);
@ -1032,7 +1029,7 @@ call p1();
ERROR: type "pck1.r2" is not supported as column type ERROR: type "pck1.r2" is not supported as column type
DETAIL: "pck1.r2" is a package or procedure type DETAIL: "pck1.r2" is a package or procedure type
CONTEXT: SQL statement "create table t1(a pck1.r2)" 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 create or replace procedure p1 as
begin begin
create table t1(a pck1.r3); create table t1(a pck1.r3);
@ -1042,7 +1039,7 @@ call p1();
ERROR: type "pck1.r3" is not supported as column type ERROR: type "pck1.r3" is not supported as column type
DETAIL: "pck1.r3" is a package or procedure type DETAIL: "pck1.r3" is a package or procedure type
CONTEXT: SQL statement "create table t1(a pck1.r3)" 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 create or replace procedure p1 as
begin begin
create type o1 as (a pck1.r1); create type o1 as (a pck1.r1);
@ -1052,7 +1049,7 @@ call p1();
ERROR: type "pck1.r1" is not supported as column type ERROR: type "pck1.r1" is not supported as column type
DETAIL: "pck1.r1" is a package or procedure type DETAIL: "pck1.r1" is a package or procedure type
CONTEXT: SQL statement "create type o1 as (a pck1.r1)" 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 create or replace procedure p1 as
begin begin
create type o1 as (a pck1.r2); create type o1 as (a pck1.r2);
@ -1062,7 +1059,7 @@ call p1();
ERROR: type "pck1.r2" is not supported as column type ERROR: type "pck1.r2" is not supported as column type
DETAIL: "pck1.r2" is a package or procedure type DETAIL: "pck1.r2" is a package or procedure type
CONTEXT: SQL statement "create type o1 as (a pck1.r2)" 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 create or replace procedure p1 as
begin begin
create type o1 as (a pck1.r3); create type o1 as (a pck1.r3);
@ -1072,7 +1069,7 @@ call p1();
ERROR: type "pck1.r3" is not supported as column type ERROR: type "pck1.r3" is not supported as column type
DETAIL: "pck1.r3" is a package or procedure type DETAIL: "pck1.r3" is a package or procedure type
CONTEXT: SQL statement "create type o1 as (a pck1.r3)" 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 procedure p1;
DROP package pck1; DROP package pck1;
-- test package-depended type clean -- test package-depended type clean
@ -1343,11 +1340,10 @@ end;
end pck1; end pck1;
/ /
ERROR: record type with table of attribute is not suppoted to be referenced by another package. 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. 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 QUERY: DECLARE vb pck1.r1;
vb pck1.r1;
begin begin
null; null;
end end
@ -1366,11 +1362,10 @@ null;
end; end;
/ /
ERROR: record type with table of attribute is not suppoted to be referenced by another package. 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. 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 QUERY: DECLARE va pck1.r1;
va pck1.r1;
begin begin
null; null;
end end

View File

@ -644,10 +644,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "[" 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: QUERY: declare
declare
type c_list is TABLE of customers%rowtype; type c_list is TABLE of customers%rowtype;
customer_table c_list:=c_list(); customer_table c_list:=c_list();
begin begin
@ -716,7 +715,7 @@ end;
ERROR: mismatched brackets at or near ";" ERROR: mismatched brackets at or near ";"
LINE 6: RAISE INFO 'Student: %', names(i]; 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; names students;
begin begin
names := students(1, 'Zera ', 'Alice', 'Jim ', 'Kevin'); -- should be able read all values correctly -- names := students(1, 'Zera ', 'Alice', 'Jim ', 'Kevin'); -- should be able read all values correctly --
@ -826,9 +825,9 @@ begin
end; end;
/ /
ERROR: syntax error at or near "(" ERROR: syntax error at or near "("
LINE 1: 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[]; QUERY: DECLARE type arrayfirst is table(10) of int[];
arr arrayfirst := arrayfirst(); arr arrayfirst := arrayfirst();
begin begin

View File

@ -73,7 +73,7 @@ BEGIN
END; END;
/ /
ERROR: unrecognized exception condition "division_by_zeros" 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 create or replace procedure pro1
as as
begin begin
@ -88,10 +88,9 @@ creat table (c1 int,c2 int) t1; --顺序错误
end; end;
/ /
NOTICE: syntax error at or near "t1" NOTICE: syntax error at or near "t1"
LINE 3: drop t1; --缺失table关键字 LINE 2: drop t1; --缺失table关键字
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -102,10 +101,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "tables" NOTICE: syntax error at or near "tables"
LINE 4: drop tables t1; --错写 LINE 3: drop tables t1; --错写
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -116,10 +114,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "crop" NOTICE: syntax error at or near "crop"
LINE 5: crop table t1; --错写 LINE 4: crop table t1; --错写
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -130,10 +127,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "t2" 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 QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -144,10 +140,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "int" 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 QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -158,10 +153,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "tables" 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 QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -172,10 +166,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "creat" 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 QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -186,10 +179,9 @@ creat table t1(c1 int,c2 int); --未标行号
creat table (c1 int,c2 int) t1; --顺序错误 creat table (c1 int,c2 int) t1; --顺序错误
end end
NOTICE: syntax error at or near "creat" NOTICE: syntax error at or near "creat"
LINE 10: creat table (c1 int,c2 int) t1; --顺序错误 LINE 9: creat table (c1 int,c2 int) t1; --顺序错误
^ ^
QUERY: DECLARE QUERY: DECLARE begin
begin
drop t1; --缺失table关键字 drop t1; --缺失table关键字
drop tables t1; --错写 drop tables t1; --错写
crop table t1; --错写 crop table t1; --错写
@ -201,7 +193,7 @@ creat table (c1 int,c2 int) t1; --顺序错误
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A 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'; select line,src from dbe_pldeveloper.gs_errors where name='pro1';
line | src 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... LINE 3: SELECT count(*) INTO temp FROM DD_BB_CC_REL WHERE BB_ID...
^ ^
DETAIL: DETAIL:
QUERY: DECLARE temp INTEGER; QUERY: DECLARE temp INTEGER;
BEGIN BEGIN
SELECT count(*) INTO temp FROM DD_BB_CC_REL WHERE BB_ID=BBId; SELECT count(*) INTO temp FROM DD_BB_CC_REL WHERE BB_ID=BBId;
RETURN temp; RETURN temp;
@ -1473,19 +1465,17 @@ open v_cur for select c1,c2 from tab1;
end; end;
/ /
NOTICE: "v_cur" is not a known variable 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 QUERY: DECLARE type tpc1 is ref cursor;
type tpc1 is ref cursor;
--v_cur tpc1; --v_cur tpc1;
begin begin
open v_cur for select c1,c2 from tab1; open v_cur for select c1,c2 from tab1;
end end
ERROR: open cursor error 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 QUERY: DECLARE type tpc1 is ref cursor;
type tpc1 is ref cursor;
--v_cur tpc1; --v_cur tpc1;
begin begin
open v_cur for select c1,c2 from tab1; open v_cur for select c1,c2 from tab1;
@ -1501,10 +1491,9 @@ forall i in 1 .. v1.count save exceptions
end; end;
/ /
ERROR: invalid type's rel tuple for insert. at or near ";" 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 QUERY: DECLARE type t1 is table of tb.eno%type;
type t1 is table of tb.eno%type;
v1 t1; v1 t1;
begin begin
forall i in 1 .. v1.count save exceptions forall i in 1 .. v1.count save exceptions
@ -1533,19 +1522,17 @@ end;
end pack2; end pack2;
/ /
NOTICE: syntax error at or near "table" when compile function pro1() 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 DETAIL: syntax error
QUERY: DECLARE QUERY: DECLARE begin
begin
update table t1 set c1=1 and c2=1; update table t1 set c1=1 and c2=1;
end end
NOTICE: syntax error at or near "table" when compile function pro2() 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 DETAIL: syntax error
QUERY: DECLARE QUERY: DECLARE begin
begin
update table t1 set c1=1 and c2=1; update table t1 set c1=1 and c2=1;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
@ -1564,17 +1551,16 @@ return n;
end; end;
/ /
NOTICE: empty index at or near ")" NOTICE: empty index at or near ")"
LINE 4: n := v(); LINE 3: n := v();
^ ^
QUERY: DECLARE QUERY: DECLARE n int;
n int;
begin begin
n := v(); n := v();
return n; return n;
end end
ERROR: Debug mod,create procedure has error. ERROR: Debug mod,create procedure has error.
DETAIL: N/A 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 create or replace PACKAGE z_pk2
AS AS
PROCEDURE pro(p1 int); PROCEDURE pro(p1 int);
@ -1668,7 +1654,7 @@ end;
/ /
ERROR: array element type is not composite in assignment ERROR: array element type is not composite in assignment
DETAIL: array variable "tblof001" must be composite when assign value to attibute 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(); drop procedure pro_tblof_pro_013_1();
ERROR: function pro_tblof_pro_013_1 does not exist ERROR: function pro_tblof_pro_013_1 does not exist
drop type pro_tblof_013; drop type pro_tblof_013;
@ -1685,10 +1671,9 @@ begin
end; end;
/ /
NOTICE: syntax error at or near ";" NOTICE: syntax error at or near ";"
LINE 4: select c1 from t1 into ; LINE 3: select c1 from t1 into ;
^ ^
QUERY: DECLARE QUERY: DECLARE a int;
a int;
begin begin
select c1 from t1 into ; select c1 from t1 into ;
select c1 from t1 limit 1 a; select c1 from t1 limit 1 a;
@ -1696,11 +1681,10 @@ begin
select c1 from t1 into b; select c1 from t1 into b;
end end
ERROR: relation "t1" does not exist ERROR: relation "t1" does not exist
LINE 4: select c1 from t1 into ; LINE 3: select c1 from t1 into ;
^ ^
DETAIL: DETAIL:
QUERY: DECLARE QUERY: DECLARE a int;
a int;
begin begin
select c1 from t1 into ; select c1 from t1 into ;
select c1 from t1 limit 1 a; select c1 from t1 limit 1 a;
@ -1716,26 +1700,24 @@ begin
end; end;
/ /
NOTICE: syntax error at or near "from" 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 QUERY: DECLARE a int;
a int;
begin begin
select into a from t1.c1; select into a from t1.c1;
select 1 into ab; select 1 into ab;
end end
NOTICE: syntax error at or near "from" NOTICE: syntax error at or near "from"
LINE 2: a int; LINE 1: DECLARE a int;
^ ^
QUERY: DECLARE QUERY: DECLARE a int;
a int;
begin begin
select into a from t1.c1; select into a from t1.c1;
select 1 into ab; select 1 into ab;
end end
ERROR: compile failed when parse the query: select from t1.c1 ERROR: compile failed when parse the query: select from t1.c1
DETAIL: unexpected null parsetree list 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 create or replace procedure pro21
as as
a int; a int;
@ -1746,21 +1728,19 @@ begin
end; end;
/ /
NOTICE: "ab" is not a known variable NOTICE: "ab" is not a known variable
LINE 4: select 1 into ab; LINE 3: select 1 into ab;
^ ^
QUERY: DECLARE QUERY: DECLARE a int;
a int;
begin begin
select 1 into ab; select 1 into ab;
select 1 intoo a; select 1 intoo a;
dbe_output.print_line('a is:'||a); dbe_output.print_line('a is:'||a);
end end
ERROR: Invalid use of identifiers. ERROR: Invalid use of identifiers.
LINE 5: select 1 intoo a; LINE 4: select 1 intoo a;
^ ^
DETAIL: Syntax error found near token "intoo" DETAIL: Syntax error found near token "intoo"
QUERY: DECLARE QUERY: DECLARE a int;
a int;
begin begin
select 1 into ab; select 1 into ab;
select 1 intoo a; select 1 intoo a;
@ -1777,7 +1757,7 @@ begin
end; end;
/ /
ERROR: schema "dbe_output" does not exist 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 = ''; set behavior_compat_options = '';
drop package if exists package_020; drop package if exists package_020;
NOTICE: drop cascades to 2 other objects NOTICE: drop cascades to 2 other objects

View File

@ -226,7 +226,7 @@ end;
/ /
INFO: proc1 INFO: proc1
CONTEXT: SQL statement "CALL call_test.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; select * from t1 where c1 = call_test.func1;
c1 c1
---- ----
@ -261,7 +261,7 @@ call_test.func2;
end; end;
/ /
ERROR: function call_test.func2 has no enough parameters 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 declare
var int; var int;
begin 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 LINE 1: select c1 from t1 where c1 = call_test.func2
^ ^
QUERY: 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; drop package call_test;
NOTICE: drop cascades to 6 other objects NOTICE: drop cascades to 6 other objects
DETAIL: drop cascades to function sch2.func1() DETAIL: drop cascades to function sch2.func1()

View File

@ -9,7 +9,7 @@ end;
call test_without_commit(); call test_without_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_without_commit
--------------------- ---------------------
@ -57,7 +57,7 @@ end;
call test_commit(); call test_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit
------------- -------------
@ -83,7 +83,7 @@ end;
call test_commit_insert_option(); call test_commit_insert_option();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_option
--------------------------- ---------------------------
@ -110,7 +110,7 @@ end;
call test_commit_insert_delete(); call test_commit_insert_delete();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_delete
--------------------------- ---------------------------
@ -136,7 +136,7 @@ end;
call test_commit_insert_update(); call test_commit_insert_update();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_update
--------------------------- ---------------------------
@ -163,7 +163,7 @@ end;
call test_commit_insert_update_delete(); call test_commit_insert_update_delete();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_update_delete
---------------------------------- ----------------------------------
@ -190,7 +190,7 @@ end;
call test_commit_insert_delete_update(); call test_commit_insert_delete_update();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_delete_update
---------------------------------- ----------------------------------
@ -217,7 +217,7 @@ end;
call test_commit_commit(); call test_commit_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_commit
-------------------- --------------------
@ -247,7 +247,7 @@ end;
call test_commit_commit1(); call test_commit_commit1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_commit1
--------------------- ---------------------
@ -274,7 +274,7 @@ end;
call test_commit_rollback(); call test_commit_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_rollback
---------------------- ----------------------
@ -303,7 +303,7 @@ end;
call test_commit_rollback1(); call test_commit_rollback1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_rollback1
----------------------- -----------------------
@ -338,10 +338,10 @@ end;
call test_rollback_commit(); call test_rollback_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_rollback_commit
---------------------- ----------------------
@ -372,7 +372,7 @@ end;
call test_commit_insert_exception_rollback(); call test_commit_insert_exception_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_exception_rollback
--------------------------------------- ---------------------------------------
@ -403,7 +403,7 @@ end;
call test_commit_insert_exception_commit_rollback(); call test_commit_insert_exception_commit_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_exception_commit_rollback
---------------------------------------------- ----------------------------------------------
@ -430,7 +430,7 @@ end;
call test_commit_insert_raise_commit(); call test_commit_insert_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -454,7 +454,7 @@ end;
call test_commit_insert_delete_raise_commit(); call test_commit_insert_delete_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -477,7 +477,7 @@ end;
call test_commit_insert_update_raise_commit(); call test_commit_insert_update_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -501,7 +501,7 @@ end;
call test_commit_insert_update_delete_raise_commit(); call test_commit_insert_update_delete_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -525,7 +525,7 @@ end;
call test_commit_insert_delete_update_raise_commit(); call test_commit_insert_delete_update_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -547,7 +547,7 @@ end;
call test_commit_insert_commit_raise(); call test_commit_insert_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -570,7 +570,7 @@ end;
call test_commit_insert_delete_commit_raise(); call test_commit_insert_delete_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -592,7 +592,7 @@ end;
call test_commit_insert_update_commit_raise(); call test_commit_insert_update_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -615,7 +615,7 @@ end;
call test_commit_insert_update_delete_commit_raise(); call test_commit_insert_update_delete_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -639,7 +639,7 @@ end;
call test_commit_insert_delete_update_commit_raise(); call test_commit_insert_delete_update_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -665,7 +665,7 @@ end;
call test_exception_commit(); call test_exception_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_exception_commit
----------------------- -----------------------
@ -697,7 +697,7 @@ end;
call test_exception_commit_commit_raise(); call test_exception_commit_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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) ERROR: (After commit)
select * from test_commit; select * from test_commit;
a | b a | b
@ -725,7 +725,7 @@ end;
call test_exception_commit_raise_commit(); call test_exception_commit_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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) ERROR: (After commit)
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -755,7 +755,7 @@ end;
call test_gg_1(); call test_gg_1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_gg_1
----------- -----------
@ -789,7 +789,7 @@ end;
call test_commit_exception(); call test_commit_exception();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_exception
----------------------- -----------------------
@ -825,7 +825,7 @@ end;
call test_commit2(); call test_commit2();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit2
-------------- --------------
@ -860,7 +860,7 @@ end;
call test_commit3(); call test_commit3();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit3
-------------- --------------
@ -892,7 +892,7 @@ end;
call test_rollback_with_exception(); call test_rollback_with_exception();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_rollback_with_exception
------------------------------ ------------------------------
@ -920,7 +920,7 @@ end;
call test_nest_function_without_commit(); call test_nest_function_without_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_nest_function_without_commit
----------------------------------- -----------------------------------
@ -949,7 +949,7 @@ end;
call test_nest_function(); call test_nest_function();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_nest_function
-------------------- --------------------
@ -974,9 +974,9 @@ end;
call test_nest_function1(); call test_nest_function1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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()" 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 test_nest_function1
--------------------- ---------------------
@ -998,9 +998,9 @@ end;
call test_nest_function2(); call test_nest_function2();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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()" 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 test_nest_function2
--------------------- ---------------------
@ -1023,9 +1023,9 @@ end;
call test_nest_function_rollback(); call test_nest_function_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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()" 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 test_nest_function_rollback
----------------------------- -----------------------------
@ -1053,7 +1053,7 @@ ERROR: relation "tx" does not exist on datanode1
LINE 1: insert into tx select 3 LINE 1: insert into tx select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; 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 LINE 1: insert into tx select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1100,12 +1100,12 @@ end;
call test_commit_exception_commit(); call test_commit_exception_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 3 LINE 1: insert into test_commit select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1130,12 +1130,12 @@ end;
call test_commit_exception_commit_commit(); call test_commit_exception_commit_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 3 LINE 1: insert into test_commit select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1160,12 +1160,12 @@ end;
call test_commit_exception_commit_rollback(); call test_commit_exception_commit_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 3 LINE 1: insert into test_commit select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1185,12 +1185,12 @@ end;
call test_rollback(); call test_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 2 LINE 1: insert into test_commit select 2
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1396,10 +1396,10 @@ select FUNCTION_EXAMPLE1();
select * from FUNCTION_EXAMPLE1() where 1=1; select * from FUNCTION_EXAMPLE1() where 1=1;
ERROR: can not use commit rollback in Complex SQL 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(); update EXAMPLE1 set COL1=666 where COL1=2 and FUNCTION_EXAMPLE1();
ERROR: can not use commit rollback in Complex SQL 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()); select (select FUNCTION_EXAMPLE1());
function_example1 function_example1
------------------- -------------------
@ -1408,7 +1408,7 @@ select (select FUNCTION_EXAMPLE1());
select (select * from FUNCTION_EXAMPLE1() where 1=1); select (select * from FUNCTION_EXAMPLE1() where 1=1);
ERROR: can not use commit rollback in Complex SQL 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 referenced column: function_example1
create or replace function func1() return void create or replace function func1() return void
as as

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -19,10 +19,9 @@ h_data varchar(24));
end; end;
/ /
ERROR: syntax error at or near ";" ERROR: syntax error at or near ";"
LINE 15: ; LINE 14: ;
^ ^
QUERY: QUERY: declare
declare
count_num int; count_num int;
f_count_num int; f_count_num int;
begin begin
@ -88,10 +87,10 @@ end;
call pro_exp_001_2(); call pro_exp_001_2();
NOTICE: table "f_pro_exp_001_1" does not exist, skipping NOTICE: table "f_pro_exp_001_1" does not exist, skipping
CONTEXT: SQL statement "drop table if exists f_pro_exp_001_1" 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 NOTICE: table "fto_pro_exp_001_1" does not exist, skipping
CONTEXT: SQL statement "drop table if exists fto_pro_exp_001_1" 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 pro_exp_001_2
--------------- ---------------
@ -156,10 +155,10 @@ end;
call pro_exp_001_1(); call pro_exp_001_1();
NOTICE: table "f_pro_exp_001_1" does not exist, skipping NOTICE: table "f_pro_exp_001_1" does not exist, skipping
CONTEXT: SQL statement "drop table if exists f_pro_exp_001_1" 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 NOTICE: table "fto_pro_exp_001_1" does not exist, skipping
CONTEXT: SQL statement "drop table if exists fto_pro_exp_001_1" 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 pro_exp_001_1
--------------- ---------------

View File

@ -60,8 +60,7 @@ CREATE DEFINER = testusr1 FUNCTION public.func_definer1(integer, integer)
AS $function$select $1 + $2;$function$; AS $function$select $1 + $2;$function$;
\sf proc_definer1 \sf proc_definer1
CREATE DEFINER = testusr1 PROCEDURE public.proc_definer1() CREATE DEFINER = testusr1 PROCEDURE public.proc_definer1()
AS DECLARE AS DECLARE BEGIN
BEGIN
raise info 'create definer procedure.'; raise info 'create definer procedure.';
END; END;
/ /
@ -123,8 +122,7 @@ CREATE DATABASE mysqltestbak DBCOMPATIBILITY 'B';
\c mysqltestbak \c mysqltestbak
\sf proc_definer1 \sf proc_definer1
CREATE DEFINER = testusr1 PROCEDURE public.proc_definer1() CREATE DEFINER = testusr1 PROCEDURE public.proc_definer1()
AS DECLARE AS DECLARE BEGIN
BEGIN
raise info 'create definer procedure.'; raise info 'create definer procedure.';
END; END;
/ /

View File

@ -85,28 +85,28 @@ end;
\! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call proc094();"; \! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call proc094();";
INFO: c1.first is f INFO: c1.first is f
CONTEXT: SQL statement "CALL pkg094.p1(v1)" 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 INFO: c1.last is true
CONTEXT: SQL statement "CALL pkg094.p1(v1)" 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 INFO: c1.first.next t
CONTEXT: SQL statement "CALL pkg094.p1(v1)" 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 INFO: c1.last.prior t
CONTEXT: SQL statement "CALL pkg094.p1(v1)" 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 <NULL> INFO: c1.first.prior <NULL>
CONTEXT: SQL statement "CALL pkg094.p1(v1)" 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 <NULL> INFO: c1.last.next <NULL>
CONTEXT: SQL statement "CALL pkg094.p1(v1)" 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 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)" 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"} 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)" 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 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.first is f
INFO: v1.last is true INFO: v1.last is true
@ -173,24 +173,24 @@ end pkg096;
call pkg096.p2(); call pkg096.p2();
INFO: c1 is {123455,ABCDEF,012345} INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL p3(c1=>c1)" 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)" 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} INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" 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 INFO: c1.first is JIEsubst,c1.last is pingJIEsubstr,c1.first.next is pingJ
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" 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 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)" 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} INFO: c2 is {123455,ABCDEF,012345,678910}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" 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 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)" 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: r1 is {123455,ABCDEF,012345}
INFO: r2 is {123455,ABCDEF,012345,678910} INFO: r2 is {123455,ABCDEF,012345,678910}
p2 p2
@ -201,24 +201,24 @@ INFO: r2 is {123455,ABCDEF,012345,678910}
\! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call pkg096.p2();"; \! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call pkg096.p2();";
INFO: c1 is {123455,ABCDEF,012345} INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL p3(c1=>c1)" 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)" 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} INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" 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 INFO: c1.first is JIEsubst,c1.last is pingJIEsubstr,c1.first.next is pingJ
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" 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 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)" 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} INFO: c2 is {123455,ABCDEF,012345,678910}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)" 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 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)" 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: r1 is {123455,ABCDEF,012345}
INFO: r2 is {123455,ABCDEF,012345,678910} INFO: r2 is {123455,ABCDEF,012345,678910}
p2 p2

View File

@ -138,7 +138,7 @@ call pri_fun_schema.pri_autonomous_1();
ERROR: permission denied for relation creditcard_info ERROR: permission denied for relation creditcard_info
DETAIL: N/A DETAIL: N/A
CONTEXT: SQL statement "insert into pri_fun_schema.creditcard_info values(66, 66,66)" 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 TABLE in procedure
create or replace procedure pri_fun_schema.pri_test_proc_create(i in integer) create or replace procedure pri_fun_schema.pri_test_proc_create(i in integer)
as as
@ -150,7 +150,7 @@ select pri_fun_schema.pri_test_proc_create(1);
ERROR: permission denied for schema pri_fun_schema ERROR: permission denied for schema pri_fun_schema
DETAIL: N/A DETAIL: N/A
CONTEXT: SQL statement "create table pri_fun_schema.pri_t11(id int) tablespace pri_create_fun_tsp" 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 referenced column: pri_test_proc_create
reset role; reset role;
--删除函数。 --删除函数。

View File

@ -178,12 +178,12 @@ call exe_fun_schema.pri_autonomous_1();
ERROR: permission denied for relation creditcard_info ERROR: permission denied for relation creditcard_info
DETAIL: N/A DETAIL: N/A
CONTEXT: SQL statement "insert into exe_fun_schema.creditcard_info values(66, 66,66)" 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); select exe_fun_schema.pri_test_proc_create(1);
ERROR: permission denied for schema exe_fun_schema ERROR: permission denied for schema exe_fun_schema
DETAIL: N/A DETAIL: N/A
CONTEXT: SQL statement "create table exe_fun_schema.pri_t11(id int) tablespace pri_execute_fun_tsp" 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 referenced column: pri_test_proc_create
DROP PROCEDURE exe_fun_schema.prc_add(INTEGER,INTEGER); DROP PROCEDURE exe_fun_schema.prc_add(INTEGER,INTEGER);
ERROR: permission denied for function exe_fun_schema.prc_add ERROR: permission denied for function exe_fun_schema.prc_add

View File

@ -257,7 +257,7 @@ end;
call outer_pro(10); call outer_pro(10);
NOTICE: table "tb1" does not exist, skipping NOTICE: table "tb1" does not exist, skipping
CONTEXT: SQL statement "drop table if exists tb1" 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 outer_pro
----------- -----------

View File

@ -9,7 +9,7 @@ end;
call test_without_commit(); call test_without_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_without_commit
--------------------- ---------------------
@ -57,7 +57,7 @@ end;
call test_commit(); call test_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit
------------- -------------
@ -83,7 +83,7 @@ end;
call test_commit_insert_option(); call test_commit_insert_option();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_option
--------------------------- ---------------------------
@ -110,7 +110,7 @@ end;
call test_commit_insert_delete(); call test_commit_insert_delete();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_delete
--------------------------- ---------------------------
@ -136,7 +136,7 @@ end;
call test_commit_insert_update(); call test_commit_insert_update();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_update
--------------------------- ---------------------------
@ -163,7 +163,7 @@ end;
call test_commit_insert_update_delete(); call test_commit_insert_update_delete();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_update_delete
---------------------------------- ----------------------------------
@ -190,7 +190,7 @@ end;
call test_commit_insert_delete_update(); call test_commit_insert_delete_update();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_delete_update
---------------------------------- ----------------------------------
@ -217,7 +217,7 @@ end;
call test_commit_commit(); call test_commit_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_commit
-------------------- --------------------
@ -247,7 +247,7 @@ end;
call test_commit_commit1(); call test_commit_commit1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_commit1
--------------------- ---------------------
@ -274,7 +274,7 @@ end;
call test_commit_rollback(); call test_commit_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_rollback
---------------------- ----------------------
@ -303,7 +303,7 @@ end;
call test_commit_rollback1(); call test_commit_rollback1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_rollback1
----------------------- -----------------------
@ -338,10 +338,10 @@ end;
call test_rollback_commit(); call test_rollback_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_rollback_commit
---------------------- ----------------------
@ -372,7 +372,7 @@ end;
call test_commit_insert_exception_rollback(); call test_commit_insert_exception_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_exception_rollback
--------------------------------------- ---------------------------------------
@ -403,7 +403,7 @@ end;
call test_commit_insert_exception_commit_rollback(); call test_commit_insert_exception_commit_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_insert_exception_commit_rollback
---------------------------------------------- ----------------------------------------------
@ -430,7 +430,7 @@ end;
call test_commit_insert_raise_commit(); call test_commit_insert_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -454,7 +454,7 @@ end;
call test_commit_insert_delete_raise_commit(); call test_commit_insert_delete_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -477,7 +477,7 @@ end;
call test_commit_insert_update_raise_commit(); call test_commit_insert_update_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -501,7 +501,7 @@ end;
call test_commit_insert_update_delete_raise_commit(); call test_commit_insert_update_delete_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -525,7 +525,7 @@ end;
call test_commit_insert_delete_update_raise_commit(); call test_commit_insert_delete_update_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: After commit
select * from test_commit; select * from test_commit;
a | b a | b
@ -569,7 +569,7 @@ end;
call test_commit_insert_delete_commit_raise(); call test_commit_insert_delete_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -591,7 +591,7 @@ end;
call test_commit_insert_update_commit_raise(); call test_commit_insert_update_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -614,7 +614,7 @@ end;
call test_commit_insert_update_delete_commit_raise(); call test_commit_insert_update_delete_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -638,7 +638,7 @@ end;
call test_commit_insert_delete_update_commit_raise(); call test_commit_insert_delete_update_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: Before commit
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -664,7 +664,7 @@ end;
call test_exception_commit(); call test_exception_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_exception_commit
----------------------- -----------------------
@ -696,7 +696,7 @@ end;
call test_exception_commit_commit_raise(); call test_exception_commit_commit_raise();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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) ERROR: (After commit)
select * from test_commit; select * from test_commit;
a | b a | b
@ -724,7 +724,7 @@ end;
call test_exception_commit_raise_commit(); call test_exception_commit_raise_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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) ERROR: (After commit)
select * from test_commit; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
@ -754,7 +754,7 @@ end;
call test_gg_1(); call test_gg_1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_gg_1
----------- -----------
@ -788,7 +788,7 @@ end;
call test_commit_exception(); call test_commit_exception();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit_exception
----------------------- -----------------------
@ -824,7 +824,7 @@ end;
call test_commit2(); call test_commit2();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit2
-------------- --------------
@ -859,7 +859,7 @@ end;
call test_commit3(); call test_commit3();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_commit3
-------------- --------------
@ -891,7 +891,7 @@ end;
call test_rollback_with_exception(); call test_rollback_with_exception();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_rollback_with_exception
------------------------------ ------------------------------
@ -919,7 +919,7 @@ end;
call test_nest_procedure_without_commit(); call test_nest_procedure_without_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_nest_procedure_without_commit
------------------------------------ ------------------------------------
@ -948,7 +948,7 @@ end;
call test_nest_procedure(); call test_nest_procedure();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 test_nest_procedure
--------------------- ---------------------
@ -973,9 +973,9 @@ end;
call test_nest_procedure1(); call test_nest_procedure1();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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()" 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 test_nest_procedure1
---------------------- ----------------------
@ -997,9 +997,9 @@ end;
call test_nest_procedure2(); call test_nest_procedure2();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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()" 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 test_nest_procedure2
---------------------- ----------------------
@ -1022,9 +1022,9 @@ end;
call test_nest_procedure_rollback(); call test_nest_procedure_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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()" 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 test_nest_procedure_rollback
------------------------------ ------------------------------
@ -1052,7 +1052,7 @@ ERROR: relation "tx" does not exist on datanode1
LINE 1: insert into tx select 3 LINE 1: insert into tx select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; 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 LINE 1: insert into tx select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1099,12 +1099,12 @@ end;
call test_commit_exception_commit(); call test_commit_exception_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 3 LINE 1: insert into test_commit select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1129,12 +1129,12 @@ end;
call test_commit_exception_commit_commit(); call test_commit_exception_commit_commit();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 3 LINE 1: insert into test_commit select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1159,12 +1159,12 @@ end;
call test_commit_exception_commit_rollback(); call test_commit_exception_commit_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 3 LINE 1: insert into test_commit select 3
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;
@ -1184,12 +1184,12 @@ end;
call test_rollback(); call test_rollback();
NOTICE: table "test_commit" does not exist, skipping NOTICE: table "test_commit" does not exist, skipping
CONTEXT: SQL statement "drop table if exists test_commit" 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 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: insert into test_commit select 2 LINE 1: insert into test_commit select 2
^ ^
QUERY: 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; select * from test_commit;
ERROR: relation "test_commit" does not exist on datanode1 ERROR: relation "test_commit" does not exist on datanode1
LINE 1: select * from test_commit; LINE 1: select * from test_commit;

View File

@ -61,7 +61,7 @@ insert into old_dump values(2,2);
ERROR: permission denied for relation tab_dump ERROR: permission denied for relation tab_dump
DETAIL: N/A DETAIL: N/A
CONTEXT: SQL statement "insert into tab_dump values(new.id,new.c1)" 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 \c test2_dump
--insert --insert
insert into old_dump values(2,2); 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 ERROR: permission denied for relation tab_dump
DETAIL: N/A DETAIL: N/A
CONTEXT: SQL statement "insert into tab_dump values(new.id,new.c1)" 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 \c regression
drop database test_dump; drop database test_dump;
drop database test1_dump; drop database test1_dump;

View File

@ -66,8 +66,7 @@ ALTER SCHEMA "Test_User" OWNER TO "Test_User";
CREATE SCHEMA test_user2; CREATE SCHEMA test_user2;
ALTER SCHEMA test_user2 OWNER TO test_user2; ALTER SCHEMA test_user2 OWNER TO test_user2;
CREATE DEFINER = "Root_Test" PROCEDURE pro_1107262(n int) NOT SHIPPABLE CREATE DEFINER = "Root_Test" PROCEDURE pro_1107262(n int) NOT SHIPPABLE
AS DECLARE AS DECLARE begin
begin
repeat repeat
insert into tab_1107262 values(n,n*2); insert into tab_1107262 values(n,n*2);
n:=n+1; n:=n+1;

View File

@ -634,5 +634,58 @@ drop procedure p_definer;
drop procedure p_caller; drop procedure p_caller;
drop table test_emp_001; drop table test_emp_001;
drop procedure test_proc_using_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; \c regression;
drop database IF EXISTS pl_test_pkg_define; drop database IF EXISTS pl_test_pkg_define;