You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have a simple key defined within a table in a function/procedure, it is exported as is, which causes issues as just key isn't a right syntax for YB.
Sample source schema:
delimiter //
create function foo (p_id int)
returns varchar(20)
reads sql data
begin
create temporary table temp(id int, name text,key(id));
insert into temp(id,name) select id,p_name from bar where p_id=id;
return (select name from temp);
end//
Exported schema:
CREATE OR REPLACE FUNCTION foo (p_id integer) RETURNS varchar AS $body$
BEGIN
create temporary table temp(id int, name text,key(id));
insert into temp(id,name) select id,p_name from bar where p_id=id;
return(select name from temp);
end;
$body$
LANGUAGE PLPGSQL
SECURITY DEFINER
;
Workaround:
Remove the key from the exported schema, or create an index manually
The text was updated successfully, but these errors were encountered:
If we have a simple
key
defined within a table in a function/procedure, it is exported as is, which causes issues as justkey
isn't a right syntax for YB.Sample source schema:
Exported schema:
Workaround:
Remove the key from the exported schema, or create an index manually
The text was updated successfully, but these errors were encountered: