Skip to content

SQLSTATE 42601 on CREATE OR REPLACE FUNCTION #174

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
fedoreremin-btf opened this issue Feb 16, 2025 · 0 comments
Open

SQLSTATE 42601 on CREATE OR REPLACE FUNCTION #174

fedoreremin-btf opened this issue Feb 16, 2025 · 0 comments

Comments

@fedoreremin-btf
Copy link

Describe the bug
When trying to execute create or replace function, it complains at SQLSTATE 42601

To Reproduce
execute

create or replace function concat(id int)
    returns text
    language plpgsql
    as
$$
declare
    name text;
begin
    select coalesce(last_name||' ', ''),
        coalesce(first_name||' ', ''),
        coalesce(middle_name||' ', '')
    into name
    from person
    where person.id = id;
    return trim(name);
end;
$$;

Expected behavior
Complete execution

Versions (please complete the following information):

  • OS Version: Arch Linux
  • sqls Version 0.2.27

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant