-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Labels
bugSomething isn't workingSomething isn't workingpostgresIssues relating to the Postgres dialectIssues relating to the Postgres dialect
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
SqlFluff's postgres dialect fails to parse CASE expressions used in the json_object
function when using the syntax introduced in Postgres 16
Expected Behaviour
SqlFluff should report no issues with this statement
Observed Behaviour
Line 1, Position 19: Found unparsable section: "(/n 'new': CASE/n WHEN s..."sqlfluff(PRS)
How to reproduce
SELECT json_object(
'word': CASE
WHEN str = '1' THEN 'One'
WHEN str = '2' THEN 'Two'
ELSE 'Unknown'
END
) AS json_column
FROM first_table;
Dialect
postgres
Version
3.3.1
Configuration
[sqlfluff]
dialect = postgres
max_line_length = 120
exclude_rules = L039, L003, L071
Are you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpostgresIssues relating to the Postgres dialectIssues relating to the Postgres dialect