New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow referencing cursors as record variables in PSQL [CORE4403] #4725
Comments
Modified by: @dyemanovFix Version: 3.0 Beta 2 [ 10586 ] |
Modified by: @dyemanovassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @pavel-zotov It will be useful to implement ability to reference record variable via cursor like this: execute block as Currently this leads to error: "column unknown C1.X" |
Commented by: @asfernandes I'll check it. |
Commented by: @asfernandes Please test the fix. |
Commented by: @pavel-zotov Checked on LI-T6.3.0.31152. Seems that OK. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done with caveats Test Details: TODO: uncomment block with "execute procedure sp_test(ce.x) returning_values(ce.y);" after CORE4819 will be fixed. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done with caveats => Done successfully Test Details: TODO: uncomment block with "execute procedure sp_test(ce.x) returning_values(ce.y);" after CORE4819 will be fixed. => Works OK since build 31846. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] Test Details: Works OK since build 31846. => |
Submitted by: @dyemanov
Is duplicated by CORE2714
Votes: 3
Either explicit (DECLARE AS CURSOR) or implicit (FOR SELECT) PSQL cursors could make their current record available via the cursor name similar to OLD/NEW trigger contexts, thus making the INTO clause optional. In FOR SELECT loops, it requires AS CURSOR clause to be specified. For example:
for
select rdb$relation_id as id, rdb$relation_name as name
from rdb$relations
where rdb$view_blr is null
as cursor tables
do begin
out_id = http://tables.id;
out_name = http://tables.name;
suspend;
end
To avoid ambiguities, the colon prefix could be used.
Commits: d7b5b1a db03538 3f8de25 FirebirdSQL/fbt-repository@abe97ce FirebirdSQL/fbt-repository@36b25b0 FirebirdSQL/fbt-repository@03f4f5f
The text was updated successfully, but these errors were encountered: