Skip to content

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

Open
@Donnerstagnacht

Description

@Donnerstagnacht

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions