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

View File

@ -685,7 +685,7 @@ begin
end;
/
ERROR: schema "colors" does not exist
CONTEXT: compilation of PL/pgSQL function "array_interface_p8" near line 7
CONTEXT: compilation of PL/pgSQL function "array_interface_p8" near line 6
--call array_interface_p8();
-- test array exists interface A.B input parameter
create or replace procedure array_interface_p9()

View File

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

View File

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

View File

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

View File

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

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)
CONTEXT: referenced column: c_char1
SQL statement "insert into inst_trc_t1_01 values(c_varchar2,c_date,c_timestamp_wztimezone,c_number,substr(c_date,3,6))"
PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 3 at SQL statement
PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 2 at SQL statement
set td_compatible_truncation=on;
show td_compatible_truncation;
td_compatible_truncation
@ -365,7 +365,7 @@ call pro_insert_trunc(43947123894723895743728943.5425235,'2016-06-30','2013-12-1
ERROR: value too long for type character(6)
CONTEXT: referenced column: c_char1
SQL statement "insert into inst_trc_t1_01 values(c_varchar2,c_date,c_timestamp_wztimezone,c_number,substr(c_date,3,6))"
PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 3 at SQL statement
PL/pgSQL function pro_insert_trunc(character varying,date,timestamp with time zone,numeric) line 2 at SQL statement
drop table if exists inst_trc_t1_01;
drop procedure if exists pro_insert_trunc;
--Prepare stmt test

View File

@ -46,9 +46,9 @@ END ;
/
call proc_test();
ERROR: commit/rollback/savepoint is not allowed in a non-volatile function
CONTEXT: PL/pgSQL function proc_commit() line 3 at COMMIT
CONTEXT: PL/pgSQL function proc_commit() line 2 at COMMIT
SQL statement "CALL proc_commit()"
PL/pgSQL function proc_test() line 3 at PERFORM
PL/pgSQL function proc_test() line 2 at PERFORM
create or replace procedure p1(a out varchar2,b int) is
begin
a:='aa'||b;
@ -63,5 +63,5 @@ raise info 'var:%',var;
end;
/
INFO: a:aa3
CONTEXT: PL/pgSQL function inline_code_block line 4 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 3 at assignment
INFO: var:aa3

View File

@ -320,10 +320,9 @@ begin
end;
/
ERROR: not support declare multiple variable
LINE 6: declare va1,va2 t1 default '{1,2}';
LINE 5: declare va1,va2 t1 default '{1,2}';
^
QUERY: DECLARE
type t1 is varray(10) of int;
QUERY: DECLARE type t1 is varray(10) of int;
type t2 is table of int;
type t3 is table of varchar2(10) index by varchar2(10);
type t4 is varray(10) of text;
@ -358,10 +357,9 @@ begin
end;
/
ERROR: not support declare multiple variable
LINE 6: declare va1,va2 t1 default '{1,2}';
LINE 5: declare va1,va2 t1 default '{1,2}';
^
QUERY: DECLARE
type t1 is varray(10) of int;
QUERY: DECLARE type t1 is varray(10) of int;
type t2 is table of int;
type t3 is table of varchar2(10) index by varchar2(10);
type t4 is varray(10) of text;

View File

@ -1484,9 +1484,9 @@ call sche1.pro();
ERROR: relation "test" already exists in schema "sche1"
DETAIL: creating new table with existing name in the same schema
CONTEXT: SQL statement "create table test as select * from sche_t1"
PL/pgSQL function sche1.subpro() line 3 at SQL statement
PL/pgSQL function sche1.subpro() line 2 at SQL statement
SQL statement "CALL subpro()"
PL/pgSQL function sche1.pro() line 4 at PERFORM
PL/pgSQL function sche1.pro() line 3 at PERFORM
drop schema sche1 cascade;
NOTICE: drop cascades to 3 other objects
DETAIL: drop cascades to table sche1.sche_t1

View File

@ -367,13 +367,13 @@ end;
/
call proc_test(1,'hello');
NOTICE: dfdf+f
CONTEXT: PL/pgSQL function proc_test(character varying) line 6 at assignment
CONTEXT: PL/pgSQL function proc_test(character varying) line 5 at assignment
NOTICE: dfdf+t
CONTEXT: PL/pgSQL function proc_test(character varying) line 8 at assignment
CONTEXT: PL/pgSQL function proc_test(character varying) line 7 at assignment
NOTICE: t
CONTEXT: PL/pgSQL function proc_test(character varying) line 8 at assignment
CONTEXT: PL/pgSQL function proc_test(character varying) line 7 at assignment
NOTICE: 1,test
CONTEXT: PL/pgSQL function proc_test(character varying) line 8 at assignment
CONTEXT: PL/pgSQL function proc_test(character varying) line 7 at assignment
NOTICE: t
NOTICE: 0
o_retcode
@ -434,11 +434,11 @@ end;
call proc_test(1);
NOTICE: v_c row count 0
NOTICE: open is true
CONTEXT: PL/pgSQL function proc_test(numeric) line 15 at assignment
CONTEXT: PL/pgSQL function proc_test(numeric) line 14 at assignment
NOTICE: a is open
CONTEXT: PL/pgSQL function proc_test(numeric) line 15 at assignment
CONTEXT: PL/pgSQL function proc_test(numeric) line 14 at assignment
NOTICE: fetch is execute
CONTEXT: PL/pgSQL function proc_test(numeric) line 15 at assignment
CONTEXT: PL/pgSQL function proc_test(numeric) line 14 at assignment
NOTICE: v_c found is true
NOTICE: v_c row count 1
proc_test
@ -656,12 +656,12 @@ select proc_test('1');
NOTICE: a is open
CONTEXT: referenced column: func_test
SQL statement "SELECT func_test(v_c,i_b)"
PL/pgSQL function proc_test(character varying) line 7 at assignment
PL/pgSQL function proc_test(character varying) line 6 at assignment
referenced column: proc_test
NOTICE: fetch is execute
CONTEXT: referenced column: func_test
SQL statement "SELECT func_test(v_c,i_b)"
PL/pgSQL function proc_test(character varying) line 7 at assignment
PL/pgSQL function proc_test(character varying) line 6 at assignment
referenced column: proc_test
NOTICE: t
CONTEXT: referenced column: proc_test
@ -970,11 +970,11 @@ close c;
end;
/
NOTICE: a1:1
CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 4 at assignment
NOTICE: a1:2
CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 4 at assignment
ERROR: cursor " select c1 from tb1;" does not exist in FETCH statement.
CONTEXT: PL/pgSQL function inline_code_block line 7 at FETCH
CONTEXT: PL/pgSQL function inline_code_block line 6 at FETCH
create table t1_refcursor(a int);
insert into t1_refcursor values (1);
insert into t1_refcursor values (2);

View File

@ -925,7 +925,7 @@ end
/
NOTICE: 1,true,1
CONTEXT: SQL statement "CALL proc_test()"
PL/pgSQL function inline_code_block line 7 at PERFORM
PL/pgSQL function inline_code_block line 6 at PERFORM
NOTICE: 1,true,1
drop table tb_test;
drop schema hw_cursor_part7 CASCADE;

View File

@ -424,7 +424,7 @@ NOTICE: test cursor
close pro_cursor_c0019_1;
select * from pro_cursor_c0019();
ERROR: cannot open FETCH query as cursor
CONTEXT: PL/pgSQL function pro_cursor_c0019() line 5 at OPEN
CONTEXT: PL/pgSQL function pro_cursor_c0019() line 4 at OPEN
create table test_cursor_table(c1 int,c2 varchar);
insert into test_cursor_table values(1,'Jack'),(2,'Rose');
create or replace procedure test_cursor_8() as

View File

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

View File

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

View File

@ -30,7 +30,7 @@ end;
/
call test_explain_param(123);
ERROR: query has no destination for result data
CONTEXT: PL/pgSQL function test_explain_param(integer) line 3 at SQL statement
CONTEXT: PL/pgSQL function test_explain_param(integer) line 2 at SQL statement
----
--- test 1: Insert with nonzero rows
----

View File

@ -137,7 +137,7 @@ begin
end;
/
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement
CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement
declare
a int := 1;
b int;
@ -511,7 +511,7 @@ LINE 1: SELECT 2 * test_return(a, b)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT 2 * test_return(a, b)
CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment
declare
a int := 1;
b int := 1;
@ -533,7 +533,7 @@ LINE 1: SELECT test_return(a)+ test_return(a, b)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT test_return(a)+ test_return(a, b)
CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment
DROP FUNCTION test_return;
declare
temp varchar2(20);
@ -734,7 +734,7 @@ begin
end;
/
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement
CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement
declare
a int := 1;
b int;
@ -1107,7 +1107,7 @@ LINE 1: SELECT 2 * test_return(a, b)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT 2 * test_return(a, b)
CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment
declare
a int := 1;
b int := 1;
@ -1129,7 +1129,7 @@ LINE 1: SELECT test_return(a)+ test_return(a, b)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT test_return(a)+ test_return(a, b)
CONTEXT: PL/pgSQL function inline_code_block line 6 at assignment
CONTEXT: PL/pgSQL function inline_code_block line 5 at assignment
DROP FUNCTION test_return;
declare
temp varchar2(20);

View File

@ -67,13 +67,13 @@ SET SESSION AUTHORIZATION test_grant2 password 'Gauss123';
call test_grant1.pck3.p1();
INFO: va:(1,zhangsan,shanghai)
CONTEXT: SQL statement "CALL p2(b,va,1,vb)"
PL/pgSQL function p1() line 9 at PERFORM
PL/pgSQL function p1() line 8 at PERFORM
INFO: vb(233):(10087,aa,bb)
CONTEXT: SQL statement "CALL p2(b,va,1,vb)"
PL/pgSQL function p1() line 9 at PERFORM
PL/pgSQL function p1() line 8 at PERFORM
INFO: vb:{"(10086,aa,bb)","(10087,aa,bb)"}
CONTEXT: SQL statement "CALL p2(b,va,1,vb)"
PL/pgSQL function p1() line 9 at PERFORM
PL/pgSQL function p1() line 8 at PERFORM
p1
----

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

View File

@ -691,7 +691,7 @@ begin
end;
/
ERROR: argument name "j" used more than once
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 4
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 3
declare
a int := 1;
b int := 1;
@ -701,7 +701,7 @@ begin
end;
/
ERROR: Named argument "j" can not be a const
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 6
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 5
create or replace function test_para2(col in text, col2 out int)
returns text package as $$
declare
@ -890,7 +890,7 @@ end pkg2;
call pkg2.f1(5);
INFO: the number is 5.
CONTEXT: SQL statement "CALL syn1.p1(p)"
PL/pgSQL function f1(integer) line 3 at PERFORM
PL/pgSQL function f1(integer) line 2 at PERFORM
f1
----

View File

@ -453,10 +453,9 @@ pck1.va := vb;
end;
/
ERROR: "va" is declared CONSTANT
LINE 5: pck1.va := vb;
LINE 4: pck1.va := vb;
^
QUERY: DECLARE
vb int;
QUERY: DECLARE vb int;
begin
vb := 2;
pck1.va := vb;
@ -475,10 +474,9 @@ pck1.vb := vb;
end;
/
ERROR: "pck1.vb" is not a known variable
LINE 5: pck1.vb := vb;
LINE 4: pck1.vb := vb;
^
QUERY: DECLARE
vb int;
QUERY: DECLARE vb int;
begin
vb := 2;
pck1.vb := vb;
@ -491,10 +489,9 @@ pck2.vb := vb;
end;
/
ERROR: "pck2.vb" is not a known variable
LINE 5: pck2.vb := vb;
LINE 4: pck2.vb := vb;
^
QUERY: DECLARE
vb int;
QUERY: DECLARE vb int;
begin
vb := 2;
pck2.vb := vb;
@ -1558,10 +1555,9 @@ end;
end pck1;
/
ERROR: duplicate declaration at or near "va"
LINE 3: va int;
LINE 2: va int;
^
QUERY: DECLARE
vd int := va;
QUERY: DECLARE vd int := va;
va int;
begin
end
@ -1574,10 +1570,9 @@ end;
end pck1;
/
ERROR: duplicate declaration at or near "vb"
LINE 3: vb int;
LINE 2: vb int;
^
QUERY: DECLARE
vd r2 := vb;
QUERY: DECLARE vd r2 := vb;
vb int;
begin
end
@ -1590,10 +1585,9 @@ end;
end pck1;
/
ERROR: duplicate declaration at or near "vc"
LINE 3: vc int;
LINE 2: vc int;
^
QUERY: DECLARE
vd int := vc;
QUERY: DECLARE vd int := vc;
vc int;
begin
end
@ -1656,10 +1650,9 @@ null;
end;
/
ERROR: duplicate declaration at or near "r1"
LINE 3: r1 r1;
LINE 2: r1 r1;
^
QUERY: DECLARE
type r1 is record (a int, b int);
QUERY: DECLARE type r1 is record (a int, b int);
r1 r1;
begin
null;
@ -1672,10 +1665,9 @@ null;
end;
/
ERROR: duplicate declaration at or near "r1"
LINE 3: r1 r1;
LINE 2: r1 r1;
^
QUERY: DECLARE
type r1 is varray(10) of int;
QUERY: DECLARE type r1 is varray(10) of int;
r1 r1;
begin
null;
@ -1688,10 +1680,9 @@ null;
end;
/
ERROR: duplicate declaration at or near "r1"
LINE 3: r1 r1;
LINE 2: r1 r1;
^
QUERY: DECLARE
type r1 is table of int;
QUERY: DECLARE type r1 is table of int;
r1 r1;
begin
null;
@ -1755,7 +1746,7 @@ end pck2;
call pck2.p1();
INFO: 11
CONTEXT: SQL statement "CALL p2(11)"
PL/pgSQL function p1() line 3 at PERFORM
PL/pgSQL function p1() line 2 at PERFORM
p1
----
@ -1917,7 +1908,7 @@ end pck1;
/
ERROR: compile failed when parse the query: (select a,b into v1 from tab1)
DETAIL: select into clause is not supported in cursor or for..in loop condition yet.
CONTEXT: compilation of PL/pgSQL package near line 4
CONTEXT: compilation of PL/pgSQL package near line 3
create or replace package pck1 as
func int;
function func() return int;
@ -2465,7 +2456,7 @@ end;
end pck2;
/
ERROR: pck1.c1 isn't a cursor
CONTEXT: compilation of PL/pgSQL package near line 6
CONTEXT: compilation of PL/pgSQL package near line 5
create or replace package body pck2 is
procedure p1 as
type r1 is record (a int, b int);
@ -2479,7 +2470,7 @@ end;
end pck2;
/
ERROR: undefined cursor: pck1.c2
CONTEXT: compilation of PL/pgSQL package near line 6
CONTEXT: compilation of PL/pgSQL package near line 5
DROP PACKAGE pck2;
NOTICE: drop cascades to function pkg_val_2.p1()
DROP PACKAGE pck1;
@ -2664,10 +2655,9 @@ end;
end pck1;
/
ERROR: cursor referenced by "pkg_val_2.pck1.c1" is not supported yet
LINE 4: open pkg_val_2.pck1.c1;
LINE 3: open pkg_val_2.pck1.c1;
^
QUERY: DECLARE
va t1;
QUERY: DECLARE va t1;
begin
open pkg_val_2.pck1.c1;
close pkg_val_2.pck1.c1;
@ -2697,10 +2687,9 @@ end;
end pck1;
/
ERROR: cursor referenced by "pck2.c1" in autonomous procedure is not supported yet
LINE 5: open pck2.c1;
LINE 4: open pck2.c1;
^
QUERY: DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION;
va t1;
begin
open pck2.c1;
@ -2718,10 +2707,9 @@ end;
end pck1;
/
ERROR: cursor referenced by "c1" in autonomous procedure is not supported yet
LINE 5: open c1;
LINE 4: open c1;
^
QUERY: DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
QUERY: DECLARE PRAGMA AUTONOMOUS_TRANSACTION;
va t1;
begin
open c1;
@ -2800,9 +2788,9 @@ end pck1;
call pck1.p1();
ERROR: ERROR: package cursor referenced in autonomous procedure is not supported yet
DETAIL: cursor "c1" in package "pck2" referenced in autonomous procedure is not supported yet
CONTEXT: PL/pgSQL function p2() line 4 at OPEN
CONTEXT: PL/pgSQL function p2() line 3 at OPEN
SQL statement "CALL p2()"
PL/pgSQL function p1() line 4 at PERFORM
PL/pgSQL function p1() line 3 at PERFORM
referenced column: p1
DROP PACKAGE pck1;
@ -2837,7 +2825,7 @@ end;
/
ERROR: compile failed when parse the query: select c3 from check_tab1 order by c3 limit 6
DETAIL: relation "check_tab1" does not exist on datanode1
CONTEXT: compilation of PL/pgSQL function "check_f04" near line 11
CONTEXT: compilation of PL/pgSQL function "check_f04" near line 10
create table check_tab1(a int);
create or replace function check_f04 return int as
declare
@ -2864,7 +2852,7 @@ end;
/
ERROR: compile failed when parse the query: select c3 from check_tab1 order by c3 limit 6
DETAIL: column "c3" does not exist
CONTEXT: compilation of PL/pgSQL function "check_f04" near line 11
CONTEXT: compilation of PL/pgSQL function "check_f04" near line 10
drop table check_tab1;
reset behavior_compat_options;
-- ref package cursor attr at first
@ -2974,13 +2962,13 @@ INFO: isopend: t
INFO: rowcount: 1
INFO: va:(3,4)
CONTEXT: SQL statement "CALL pp1()"
PL/pgSQL function p1() line 12 at PERFORM
PL/pgSQL function p1() line 11 at PERFORM
INFO: isopend: t
CONTEXT: SQL statement "CALL pp1()"
PL/pgSQL function p1() line 12 at PERFORM
PL/pgSQL function p1() line 11 at PERFORM
INFO: rowcount: 2
CONTEXT: SQL statement "CALL pp1()"
PL/pgSQL function p1() line 12 at PERFORM
PL/pgSQL function p1() line 11 at PERFORM
p1
----
@ -2994,11 +2982,10 @@ fetch pck1.c1 into va;
end;
/
ERROR: package cursor with arguments is only supported to be opened in the same package.
LINE 4: open pck1.c1(4);
LINE 3: open pck1.c1(4);
^
DETAIL: cursor "pck1.c1" is only supported to be opened in the package "pck1"
QUERY: DECLARE
va t1;
QUERY: DECLARE va t1;
begin
open pck1.c1(4);
fetch pck1.c1 into va;
@ -3057,10 +3044,10 @@ end;
/
INFO: before auto: hahahah,(1,cccc)
CONTEXT: SQL statement "CALL p1(150,pck1.va,pck1.vc)"
PL/pgSQL function inline_code_block line 4 at PERFORM
PL/pgSQL function inline_code_block line 3 at PERFORM
INFO: after auto: hahahah,(1,cccc)
CONTEXT: SQL statement "CALL p1(150,pck1.va,pck1.vc)"
PL/pgSQL function inline_code_block line 4 at PERFORM
PL/pgSQL function inline_code_block line 3 at PERFORM
INFO: after p1: bbbbbbb,(123,ayayayayay)
drop procedure p1;

View File

@ -580,10 +580,10 @@ end pckg_test;
call synonym_user_2.pckg_test.proc_test1();
INFO: test procedure
CONTEXT: SQL statement "CALL proc_test()"
PL/pgSQL function proc_test1() line 3 at PERFORM
PL/pgSQL function proc_test1() line 2 at PERFORM
INFO: test package procedure
CONTEXT: SQL statement "CALL pckg_test1.proc_test2()"
PL/pgSQL function proc_test1() line 4 at PERFORM
PL/pgSQL function proc_test1() line 3 at PERFORM
proc_test1
------------
@ -851,7 +851,7 @@ raise info '%',vb;
end;
/
ERROR: relation "va" does not exist when parse word.
CONTEXT: compilation of PL/pgSQL function "p1" near line 4
CONTEXT: compilation of PL/pgSQL function "p1" near line 3
-- (2) in package
create or replace package pck1 is
va test1%ROWTYPE;

View File

@ -811,5 +811,107 @@ drop procedure p_definer;
drop procedure p_caller;
drop table test_emp_001;
drop procedure test_proc_using_001;
create or replace procedure test_bt_b is
a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
prosrc
-----------------
DECLARE a int;+
begin +
a := 'abc'; +
end
(1 row)
select test_bt_b();
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment
referenced column: test_bt_b
create or replace procedure test_bt_b is
a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
prosrc
-----------------
DECLARE a int;+
begin +
a := 'abc'; +
end
(1 row)
select test_bt_b();
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment
referenced column: test_bt_b
create or replace procedure test_bt_b is
declare a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
prosrc
----------------
declare a int;+
begin +
a := 'abc'; +
end
(1 row)
select test_bt_b();
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment
referenced column: test_bt_b
create or replace procedure test_bt_b is
declare a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
prosrc
----------------
declare a int;+
begin +
a := 'abc'; +
end
(1 row)
select test_bt_b();
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment
referenced column: test_bt_b
create or
replace
procedure
test_bt_b
is
a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
prosrc
-----------------
DECLARE a int;+
begin +
a := 'abc'; +
end
(1 row)
select test_bt_b();
ERROR: invalid input syntax for integer: "abc"
CONTEXT: PL/pgSQL function test_bt_b() line 3 at assignment
referenced column: test_bt_b
drop procedure test_bt_b;
\c regression;
drop database IF EXISTS pl_test_pkg_define;

View File

@ -113,7 +113,7 @@ end;
WARNING: Please carefully use independent user as it need more self-management.
HINT: Self-management include logical backup, password manage and so on.
CONTEXT: SQL statement "CREATE USER pri_user_independent WITH INDEPENDENT IDENTIFIED BY "********""
PL/pgSQL function inline_code_block line 7 at SQL statement
PL/pgSQL function inline_code_block line 6 at SQL statement
declare
begin
declare exit handler for "sqlwarning"
@ -414,17 +414,17 @@ NOTICE: SQLSTATE = 22012
INFO: zero error
CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)"
PL/pgSQL function proc3(integer,integer) line 6 at PERFORM
PL/pgSQL function proc3(integer,integer) line 5 at PERFORM
INFO: b1 is zero
NOTICE: SQLSTATE = 0A000
INFO: emmm....
CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)"
PL/pgSQL function proc3(integer,integer) line 6 at PERFORM
PL/pgSQL function proc3(integer,integer) line 5 at PERFORM
INFO: result: 0
CONTEXT: referenced column: proc2
SQL statement "SELECT proc2(b1, a1)"
PL/pgSQL function proc3(integer,integer) line 12 at PERFORM
PL/pgSQL function proc3(integer,integer) line 11 at PERFORM
INFO: END
proc3
-------
@ -436,21 +436,21 @@ NOTICE: SQLSTATE = 22012
INFO: zero error
CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)"
PL/pgSQL function proc3(integer,integer) line 6 at PERFORM
PL/pgSQL function proc3(integer,integer) line 5 at PERFORM
INFO: b1 is zero
NOTICE: SQLSTATE = 0A000
INFO: emmm....
CONTEXT: referenced column: proc1
SQL statement "SELECT proc1(SQLSTATE)"
PL/pgSQL function proc3(integer,integer) line 6 at PERFORM
PL/pgSQL function proc3(integer,integer) line 5 at PERFORM
NOTICE: SQLSTATE = 22012
CONTEXT: referenced column: proc2
SQL statement "SELECT proc2(b1, a1)"
PL/pgSQL function proc3(integer,integer) line 12 at PERFORM
PL/pgSQL function proc3(integer,integer) line 11 at PERFORM
INFO: result: 0
CONTEXT: referenced column: proc2
SQL statement "SELECT proc2(b1, a1)"
PL/pgSQL function proc3(integer,integer) line 12 at PERFORM
PL/pgSQL function proc3(integer,integer) line 11 at PERFORM
INFO: END
proc3
-------

View File

@ -400,10 +400,9 @@ exception
END;
/
ERROR: duplicate declaration at or near "DIVISION_ZERO"
LINE 6: declare DIVISION_ZERO condition for SQLSTATE '22005';
LINE 5: declare DIVISION_ZERO condition for SQLSTATE '22005';
^
QUERY:
declare
QUERY: declare
a int;
BEGIN
declare DIVISION_ZERO condition for SQLSTATE '22012';
@ -437,7 +436,7 @@ BEGIN
END;
/
ERROR: Incorrect CONDITION value: '0'
CONTEXT: compilation of PL/pgSQL function "test_condition_5" near line 3
CONTEXT: compilation of PL/pgSQL function "test_condition_5" near line 2
-- declare condition sqlstate begin with '00'
create or replace procedure test_condition_6 as
BEGIN
@ -446,7 +445,7 @@ BEGIN
END;
/
ERROR: bad SQLSTATE '00000'
CONTEXT: compilation of PL/pgSQL function "test_condition_6" near line 3
CONTEXT: compilation of PL/pgSQL function "test_condition_6" near line 2
create or replace procedure test_condition_1 as
declare
a int;
@ -508,10 +507,9 @@ exception
END;
/
ERROR: syntax error at or near "SQLSTATE"
LINE 5: declare DIVISION_ZERO condition for SQLSTATE '22012';
LINE 4: declare DIVISION_ZERO condition for SQLSTATE '22012';
^
QUERY:
declare
QUERY: declare
a int;
BEGIN
declare DIVISION_ZERO condition for SQLSTATE '22012';

View File

@ -1166,7 +1166,7 @@ raise info 'res is:%',res;
end;
/
ERROR: when invoking function f1, no destination for argments ""
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1
drop function f1;
create or replace package pck1 is
type tp1 is record(v01 number, v03 varchar2, v02 number);

View File

@ -420,25 +420,25 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.*
--?.*
--? (.*,test_debug2,3," insert into tb1 values (1000);")
--? (.*,test_debug2,2," insert into tb1 values (1000);")
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-------------
test_debug2 | 4 | commit;
test_debug2 | 3 | commit;
(1 row)
select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query
-------------+--------+------------------------------------
test_debug2 | 5 | insert into tb1 values (2000);
test_debug2 | 4 | insert into tb1 values (2000);
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+---------------
test_debug2 | 6 | rollback;
test_debug2 | 5 | rollback;
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
@ -457,13 +457,13 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.*
--?.*
--? (.*,test_debug3,5," CASE a")
--? (.*,test_debug3,4," CASE a")
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-----------------------
test_debug3 | 7 | b := 111;
test_debug3 | 6 | b := 111;
(1 row)
select * from dbe_pldebugger.info_locals();
@ -476,19 +476,19 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+--------------------------------------------
test_debug3 | 11 | raise info 'pi_return : %',pi_return ;
test_debug3 | 10 | raise info 'pi_return : %',pi_return ;
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-------------------
test_debug3 | 14 | b := 101;
test_debug3 | 13 | b := 101;
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+---------------
test_debug3 | 15 | return b;
test_debug3 | 14 | return b;
(1 row)
select funcname, lineno, query from dbe_pldebugger.continue();
@ -510,13 +510,13 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.*
--?.*
--? (.*,test_debug4,5," CASE a")
--? (.*,test_debug4,4," CASE a")
(1 row)
select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query
-------------+--------+-----------------------
test_debug4 | 7 | b := 111;
test_debug4 | 6 | b := 111;
(1 row)
select * from dbe_pldebugger.info_locals();
@ -529,7 +529,7 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query
-------------+--------+---------------------------------
test_debug4 | 8 | call test_debug(a);
test_debug4 | 7 | call test_debug(a);
(1 row)
select funcname, lineno, query from dbe_pldebugger.step();
@ -565,7 +565,7 @@ select funcname, lineno, query from dbe_pldebugger.step();
select funcname, lineno, query from dbe_pldebugger.continue();
funcname | lineno | query
-------------+--------+-------------------
test_debug4 | 15 | b := 101;
test_debug4 | 14 | b := 101;
(1 row)
select funcname, lineno, query from dbe_pldebugger.continue();
@ -584,19 +584,19 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
attach
------------------------------------
--? (.*,test_debug4,5," CASE a")
--? (.*,test_debug4,4," CASE a")
(1 row)
SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step();
funcname | lineno | query
-------------+--------+-----------------------
test_debug4 | 7 | b := 111;
test_debug4 | 6 | b := 111;
(1 row)
SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step();
funcname | lineno | query
-------------+--------+---------------------------------
test_debug4 | 8 | call test_debug(a);
test_debug4 | 7 | call test_debug(a);
(1 row)
SELECT funcname, lineno, query FROM DBE_PLDEBUGGER.step();
@ -633,7 +633,7 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.*
--?.*
--? (.*,test_debug4,5," CASE a")
--? (.*,test_debug4,4," CASE a")
(1 row)
truncate tmp_holder;
@ -658,7 +658,7 @@ select * from tmp_holder;
2
0:31: SELECT b FROM test where a = 7 INTO b_tmp;
1:44: RAISE INFO 'cnt is %', cnt;
2:12: return b;
2:12: raise info 'pi_return : %',pi_return ;
(6 rows)
select funcname, lineno, query from dbe_pldebugger.continue();
@ -706,7 +706,7 @@ select frameno, funcname, lineno, query from dbe_pldebugger.backtrace();
frameno | funcname | lineno | query
---------+-------------+--------+------------------------------------------------
0 | test_debug | 31 | SELECT b FROM test where a = 7 INTO b_tmp;
1 | test_debug4 | 8 | call test_debug(a);
1 | test_debug4 | 7 | call test_debug(a);
(2 rows)
select * from dbe_pldebugger.info_locals();
@ -748,7 +748,7 @@ select frameno, funcname, lineno, query from dbe_pldebugger.backtrace();
frameno | funcname | lineno | query
---------+-------------+--------+---------------------------------
0 | test_debug | 44 | RAISE INFO 'cnt is %', cnt;
1 | test_debug4 | 8 | call test_debug(a);
1 | test_debug4 | 7 | call test_debug(a);
(2 rows)
select * from dbe_pldebugger.info_locals();
@ -799,31 +799,31 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
attach
------------------------------------
--? (.*,test_debug4,5," CASE a")
--? (.*,test_debug4,4," CASE a")
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-----------------------
test_debug4 | 7 | b := 111;
test_debug4 | 6 | b := 111;
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+---------------------------------
test_debug4 | 8 | call test_debug(a);
test_debug4 | 7 | call test_debug(a);
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-------------------
test_debug4 | 15 | b := 101;
test_debug4 | 14 | b := 101;
(1 row)
select funcname, lineno, query from dbe_pldebugger.step();
funcname | lineno | query
-------------+--------+---------------
test_debug4 | 16 | return b;
test_debug4 | 15 | return b;
(1 row)
select funcname, lineno, query from dbe_pldebugger.finish();
@ -845,7 +845,7 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
attach
------------------------------------
--? (.*,test_debug4,5," CASE a")
--? (.*,test_debug4,4," CASE a")
(1 row)
truncate tmp_holder;
@ -874,7 +874,7 @@ select funcname, lineno, query from dbe_pldebugger.finish();
select funcname, lineno, query from dbe_pldebugger.finish();
funcname | lineno | query
-------------+--------+-------------------
test_debug4 | 15 | b := 101;
test_debug4 | 14 | b := 101;
(1 row)
select funcname, lineno, query from dbe_pldebugger.finish();
@ -1142,7 +1142,7 @@ select pg_sleep(1);
select dbe_pldebugger.attach(nodename, port) from debug_info;
--?.*
--?.*
--? (.*,test_setvar,14," RAISE INFO E'vint:%\\nvnum:%\\nvfloat:%\\nvtext:%\\nvvarchar:%\\nvrow:%\\nvrefcursor:%',")
--? (.*,test_setvar,13," RAISE INFO E'vint:%\\nvnum:%\\nvfloat:%\\nvtext:%\\nvvarchar:%\\nvrow:%\\nvrefcursor:%',")
(1 row)
select * from dbe_pldebugger.info_locals();
@ -1171,13 +1171,13 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-------------
test_setvar | 16 | COMMIT;
test_setvar | 15 | COMMIT;
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+-------------------------------------------------------------------------
test_setvar | 17 | SELECT * FROM test ORDER BY 1 LIMIT 1 INTO vrow; -- do set var here
test_setvar | 16 | SELECT * FROM test ORDER BY 1 LIMIT 1 INTO vrow; -- do set var here
(1 row)
-- immutable to sql injection
@ -1352,13 +1352,13 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+----------------------------------------------------------------------------------------
test_setvar | 18 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%',
test_setvar | 17 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%',
(1 row)
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+---------------
test_setvar | 20 | ROLLBACK;
test_setvar | 19 | ROLLBACK;
(1 row)
select * from dbe_pldebugger.info_locals();
@ -1387,7 +1387,7 @@ select * from dbe_pldebugger.info_locals();
select funcname, lineno, query from dbe_pldebugger.next();
funcname | lineno | query
-------------+--------+----------------------------------------------------------------------------------------
test_setvar | 21 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%',
test_setvar | 20 | RAISE INFO E'vint:%\nvnum:%\nvfloat:%\nvtext:%\nvvarchar:%\nvrow:%\nvrefcursor:%',
(1 row)
select * from dbe_pldebugger.info_locals();

View File

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

View File

@ -51,6 +51,6 @@ end;
/
NOTICE: table "t_ustore_proc_temp_table_0008" does not exist, skipping
CONTEXT: SQL statement "drop table if exists t_ustore_Proc_temp_table_0008"
PL/pgSQL function t_ustore_proc_temp_table_0008(character varying) line 4 at EXECUTE statement
PL/pgSQL function t_ustore_proc_temp_table_0008(character varying) line 3 at EXECUTE statement
SQL statement "CALL t_ustore_proc_temp_table_0008(v_name)"
PL/pgSQL function inline_code_block line 4 at PERFORM
PL/pgSQL function inline_code_block line 3 at PERFORM

View File

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

View File

@ -286,10 +286,9 @@ select 1,'a','b' into va,vb vc;
end;
/
ERROR: syntax error, expected ","
LINE 6: select 1,'a','b' into va,vb vc;
LINE 5: select 1,'a','b' into va,vb vc;
^
QUERY: DECLARE
va int;
QUERY: DECLARE va int;
vb varchar2;
vc varchar2;
begin

View File

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

View File

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

View File

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

View File

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

View File

@ -644,10 +644,9 @@ begin
end;
/
ERROR: syntax error at or near "["
LINE 7: insert into customers values (customer_table[1].id, custome...
LINE 6: insert into customers values (customer_table[1].id, custome...
^
QUERY:
declare
QUERY: declare
type c_list is TABLE of customers%rowtype;
customer_table c_list:=c_list();
begin

View File

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

View File

@ -226,7 +226,7 @@ end;
/
INFO: proc1
CONTEXT: SQL statement "CALL call_test.proc1()"
PL/pgSQL function inline_code_block line 3 at PERFORM
PL/pgSQL function inline_code_block line 2 at PERFORM
select * from t1 where c1 = call_test.func1;
c1
----
@ -261,7 +261,7 @@ call_test.func2;
end;
/
ERROR: function call_test.func2 has no enough parameters
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 2
CONTEXT: compilation of PL/pgSQL function "inline_code_block" near line 1
declare
var int;
begin
@ -283,7 +283,7 @@ ERROR: missing FROM-clause entry for table "call_test"
LINE 1: select c1 from t1 where c1 = call_test.func2
^
QUERY: select c1 from t1 where c1 = call_test.func2
CONTEXT: PL/pgSQL function inline_code_block line 6 at SQL statement
CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement
drop package call_test;
NOTICE: drop cascades to 6 other objects
DETAIL: drop cascades to function sch2.func1()

View File

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

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

View File

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

View File

@ -85,28 +85,28 @@ end;
\! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call proc094();";
INFO: c1.first is f
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: c1.last is true
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: c1.first.next t
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: c1.last.prior t
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: c1.first.prior <NULL>
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>
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: c1(c1.first) is Thu Jan 06 11:22:33.234657 2022,c1(c1.last) is Thu Jan 06 12:02:44.123456 2022,c1(c1.next(c1.first)) is Thu Jan 06 09:36:45.123456 2022
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: c1 is {"Thu Jan 06 11:22:33.234657 2022","Thu Jan 06 09:36:45.123456 2022","Thu Jan 06 12:02:44.123456 2022"}
CONTEXT: SQL statement "CALL pkg094.p1(v1)"
PL/pgSQL function proc094() line 9 at PERFORM
PL/pgSQL function proc094() line 8 at PERFORM
INFO: v1 is {"Thu Jan 06 11:22:33.234657 2022","Thu Jan 06 09:36:45.123456 2022","Thu Jan 06 12:02:44.123456 2022"}
INFO: v1.first is f
INFO: v1.last is true
@ -173,24 +173,24 @@ end pkg096;
call pkg096.p2();
INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL p3(c1=>c1)"
PL/pgSQL function public.p1(_blob[],_blob[]) line 3 at PERFORM
PL/pgSQL function public.p1(_blob[],_blob[]) line 2 at PERFORM
SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c1.first is JIEsubst,c1.last is pingJIEsubstr,c1.first.next is pingJ
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c1(c1.first) is 012345,c1(c1.last) is 123455,c1(c1.first.next) is ABCDEF
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c2 is {123455,ABCDEF,012345,678910}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c2.first is 13,c2.last is pingJIEsubstr,c2.first.next is JIEsubst,c2.count is 4
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: r1 is {123455,ABCDEF,012345}
INFO: r2 is {123455,ABCDEF,012345,678910}
p2
@ -201,24 +201,24 @@ INFO: r2 is {123455,ABCDEF,012345,678910}
\! @abs_bindir@/gsql -r -p @portstring@ -d regression -c "call pkg096.p2();";
INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL p3(c1=>c1)"
PL/pgSQL function public.p1(_blob[],_blob[]) line 3 at PERFORM
PL/pgSQL function public.p1(_blob[],_blob[]) line 2 at PERFORM
SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c1 is {123455,ABCDEF,012345}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c1.first is JIEsubst,c1.last is pingJIEsubstr,c1.first.next is pingJ
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c1(c1.first) is 012345,c1(c1.last) is 123455,c1(c1.first.next) is ABCDEF
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c2 is {123455,ABCDEF,012345,678910}
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: c2.first is 13,c2.last is pingJIEsubstr,c2.first.next is JIEsubst,c2.count is 4
CONTEXT: SQL statement "CALL pkg096.p1(c1=>r1,c2=>r2)"
PL/pgSQL function p2() line 10 at PERFORM
PL/pgSQL function p2() line 9 at PERFORM
INFO: r1 is {123455,ABCDEF,012345}
INFO: r2 is {123455,ABCDEF,012345,678910}
p2

View File

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

View File

@ -178,12 +178,12 @@ call exe_fun_schema.pri_autonomous_1();
ERROR: permission denied for relation creditcard_info
DETAIL: N/A
CONTEXT: SQL statement "insert into exe_fun_schema.creditcard_info values(66, 66,66)"
PL/pgSQL function pri_autonomous_1() line 3 at SQL statement
PL/pgSQL function pri_autonomous_1() line 2 at SQL statement
select exe_fun_schema.pri_test_proc_create(1);
ERROR: permission denied for schema exe_fun_schema
DETAIL: N/A
CONTEXT: SQL statement "create table exe_fun_schema.pri_t11(id int) tablespace pri_execute_fun_tsp"
PL/pgSQL function pri_test_proc_create(integer) line 3 at SQL statement
PL/pgSQL function pri_test_proc_create(integer) line 2 at SQL statement
referenced column: pri_test_proc_create
DROP PROCEDURE exe_fun_schema.prc_add(INTEGER,INTEGER);
ERROR: permission denied for function exe_fun_schema.prc_add

View File

@ -257,7 +257,7 @@ end;
call outer_pro(10);
NOTICE: table "tb1" does not exist, skipping
CONTEXT: SQL statement "drop table if exists tb1"
PL/pgSQL function outer_pro(integer) line 4 at SQL statement
PL/pgSQL function outer_pro(integer) line 3 at SQL statement
outer_pro
-----------

View File

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

View File

@ -61,7 +61,7 @@ insert into old_dump values(2,2);
ERROR: permission denied for relation tab_dump
DETAIL: N/A
CONTEXT: SQL statement "insert into tab_dump values(new.id,new.c1)"
PL/pgSQL function tri_dump_old_dump_inlinefunc() line 3 at SQL statement
PL/pgSQL function tri_dump_old_dump_inlinefunc() line 2 at SQL statement
\c test2_dump
--insert
insert into old_dump values(2,2);
@ -84,7 +84,7 @@ insert into old_dump values(2,2);
ERROR: permission denied for relation tab_dump
DETAIL: N/A
CONTEXT: SQL statement "insert into tab_dump values(new.id,new.c1)"
PL/pgSQL function tri_dump_old_dump_inlinefunc() line 3 at SQL statement
PL/pgSQL function tri_dump_old_dump_inlinefunc() line 2 at SQL statement
\c regression
drop database test_dump;
drop database test1_dump;

View File

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

View File

@ -634,5 +634,58 @@ drop procedure p_definer;
drop procedure p_caller;
drop table test_emp_001;
drop procedure test_proc_using_001;
create or replace procedure test_bt_b is
a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
select test_bt_b();
create or replace procedure test_bt_b is
a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
select test_bt_b();
create or replace procedure test_bt_b is
declare a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
select test_bt_b();
create or replace procedure test_bt_b is
declare a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
select test_bt_b();
create or
replace
procedure
test_bt_b
is
a int;
begin
a := 'abc';
end;
/
select prosrc from pg_proc where proname='test_bt_b';
select test_bt_b();
drop procedure test_bt_b;
\c regression;
drop database IF EXISTS pl_test_pkg_define;