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
execute block
as
declare variable cnt integer;
begin
for select cnt from test_a
where id=1
into :cnt as cursor cur1
do begin
update test_a
set cnt=cnt+1
where current of cur1
returning cnt into :cnt;
end
end
summary: "UPDATE ... WHERE CURRENT OF ... RETURNING ..." not prepare in PSQL => RETURNING clause is not supported in positioned (WHERE CURRENT OF) UPDATE and DELETE statements
Submitted by: Denis Nosov (dens256)
Is duplicated by CORE3709
Votes: 1
Example:
create table test_a(id integer, cnt integer);
execute block
as
declare variable cnt integer;
begin
for select cnt from test_a
where id=1
into :cnt as cursor cur1
do begin
update test_a
set cnt=cnt+1
where current of cur1
returning cnt into :cnt;
end
end
Prepare error:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 12, column 11.
returning.
Commits: 9564611
The text was updated successfully, but these errors were encountered: