You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With MATERIALIZED VIEW, psqldef doesn't panics, but puts syntax error.
This behavior looks almost OK, but just have quoting issue.
--export output
$ psqldef -Upostgres -hlocalhost -p5432 --export some_db
2023/10/28 11:32:38 found syntax error when parsing DDL "CREATE MATERIALIZED VIEW public.nested_case AS SELECT CASE WHEN (1 > 6) THEN 3 ELSE CASE (4 + 1) WHEN 1 THEN 1 ELSE NULL::integer END END AS value": syntax error at position 147 near 'value'
Input SQL
CREATE MATERIALIZED VIEW nested_case ASSELECT CASE
WHEN 1>6 THEN 3
ELSE CASE 4+1
WHEN 1 THEN 1
ELSE NULL
END
END AS value;
psqldef gets panic on parsing online VIEWs with nested CASE.
This is split from #454, as they have different causes.
Platform
--export output
Input SQL
This is a reproducible DDL.
The text was updated successfully, but these errors were encountered: