IvorySQL
IvorySQL copied to clipboard
plisql define a new type with ref cursor could not parse schama.table%rowtype in package.
Bug Report
Meet a bug in plisql package when define a ref cursor.
create table t1(a int, b int); -- in public schema
-- create package
create or replace package pkg
is
type mycurtype is ref cursor return public.t1%rowtype; -- error.
end;
/
IvorySQL Version
lastest version
OS Version (uname -a)
Linux slpc 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Current Behavior
When execute the follow sql:
create table t1(a int, b int);
create or replace package pkg
is
type mycurtype is ref cursor return public.t1%rowtype;
end;
/
Return a error.
postgres=# create table t1(a int, b int);
CREATE TABLE
postgres=# create or replace package pkg
postgres-# is
postgres$# type mycurtype is ref cursor return public.t1%rowtype;
postgres$# end;
postgres$# /
2022-09-08 13:25:08.482 CST [74959] ERROR: syntax error at or near "." at character 76
2022-09-08 13:25:08.482 CST [74959] STATEMENT: create or replace package pkg
is
type mycurtype is ref cursor return public.t1%rowtype;
end;
ERROR: syntax error at or near "."
LINE 3: type mycurtype is ref cursor return public.t1%rowtype;
^