I have both SQL language extension and Postgres Language Server extension installed in Zed, and the two installed together create an odd error where are CTE is highlighted as 'Invalid Statement: syntax error at the end of input (pg syntax)'
The error is also exclusively in statements that CREATE VIEWs. so if a statement reads:
WITH cte_1 AS (SELECT...),
cte2 AS (SELECT...),
cte_n AS (SELECT...)
SELECT...
Then the query will be redlined all the way up to the last CTE.
I've included my relevant settings below
{
"context_servers": {
"postgres-context-server": {
"enabled": true,
"remote": false,
"settings": {
"database_url": "postgresql://sandbox:sandbox@127.0.0.1:5433/sandbox",
},
},
},
"languages": {
"SQL": {
"language_servers": ["postgres-language-server", "!sqls", "!sql-language-server"],
"inlay_hints": {
"enabled": true,
},
"remove_trailing_whitespace_on_save": false,
"preferred_line_length": 100,
"soft_wrap": "preferred_line_length",
"formatter": {
"external": {
"command": "sqlfluff",
"arguments": ["format", "--stdin", "-", "--dialect", "postgres"],
},
},
},
},
}
I have both SQL language extension and Postgres Language Server extension installed in Zed, and the two installed together create an odd error where are CTE is highlighted as 'Invalid Statement: syntax error at the end of input (pg syntax)'
The error is also exclusively in statements that CREATE VIEWs. so if a statement reads:
Then the query will be redlined all the way up to the last CTE.
I've included my relevant settings below