Skip to content
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

Cursor name can duplicate parameter and variable names in procedures and functions #7670

Closed
asfernandes opened this issue Jul 8, 2023 · 0 comments

Comments

@asfernandes
Copy link
Member

asfernandes commented Jul 8, 2023

We do not allow duplicate names of cursor, variable and parameter names in execute block.

But we're allowing cursor names to use same names as procedure/function parameters and variables:

create function f1 (x integer) returns integer
as
    declare x cursor for (select 1 n from rdb$database);
    declare y integer;
    declare y cursor for (select 1 n from rdb$database);
begin
end!
create procedure p1 (x integer)
as
    declare x cursor for (select 1 n from rdb$database);
    declare y integer;
    declare y cursor for (select 1 n from rdb$database);
begin
end!
@asfernandes asfernandes self-assigned this Jul 8, 2023
@asfernandes asfernandes changed the title Cursor name can duplicate parameter name in procedures and functions Cursor name can duplicate parameter and variable names in procedures and functions Jul 8, 2023
asfernandes added a commit that referenced this issue Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment