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

PostgreSQL functions with SETOF does not parse #1520

Closed
ErunamoJAZZ opened this issue Oct 6, 2021 · 1 comment · Fixed by #1522
Closed

PostgreSQL functions with SETOF does not parse #1520

ErunamoJAZZ opened this issue Oct 6, 2021 · 1 comment · Fixed by #1522
Labels
bug Something isn't working postgres Issues relating to the Postgres dialect

Comments

@ErunamoJAZZ
Copy link

Expected Behaviour

At least show internal lint issues

Observed Behaviour

Can't parse the function because of the setof

Steps to Reproduce

CREATE OR REPLACE FUNCTION public.postgres_setof_test()
 RETURNS SETOF text
 LANGUAGE sql
 STABLE STRICT
AS $function$
  select unnest(array['hi', 'test'])
$function$
;

sqlfluff can't parse showing a message
Found unparsable section: 'CREATE OR REPLACE FUNCTION crw_public.po...'

Dialect

postgres

Version

Python 3.8.10
sqlfluff, version 0.6.8

Configuration

[sqlfluff]
dialect = postgres

[sqlfluff:rules]
tab_space_size = 2
@ErunamoJAZZ ErunamoJAZZ added the bug Something isn't working label Oct 6, 2021
@tunetheweb tunetheweb added the postgres Issues relating to the Postgres dialect label Oct 6, 2021
@tunetheweb
Copy link
Member

Fixed in #1522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgres Issues relating to the Postgres dialect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants