Skip to content

SQL function: False error reports for function parameter references #352

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

Open
2 tasks done
Donnerstagnacht opened this issue Apr 19, 2025 · 0 comments · May be fixed by #366
Open
2 tasks done

SQL function: False error reports for function parameter references #352

Donnerstagnacht opened this issue Apr 19, 2025 · 0 comments · May be fixed by #366
Assignees
Labels
bug Something isn't working

Comments

@Donnerstagnacht
Copy link

Donnerstagnacht commented Apr 19, 2025

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

If a function takes in a named parameter and the parameter is used in the function body, the used parameter is flagged as a false error claiming that the column does not exist (But it is a function parameter).

Image

To Reproduce

Create a function with a named parameter.

create or replace function users.select_no_ref (user_id uuid) returns table (
    first_name text
) language sql security invoker as $$
select
    first_name
FROM 
    users_hidden.users
where 
    id = user_id;
$$;

Expected behavior

Named function parameters should be recognized as correct code.

System information

  • OS: windows
  • code editor: vs-code
  • pls version: 0.5.0
@Donnerstagnacht Donnerstagnacht added the bug Something isn't working label Apr 19, 2025
@psteinroe psteinroe self-assigned this Apr 19, 2025
@psteinroe psteinroe linked a pull request Apr 22, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants