-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
psqldef abort with syntax error on valid VIEW with any(ARRAY[]) #454
Comments
Thank you for reporting them. I think both of them are described well. Could you, however, split an issue for these two different cases? They are fairly independent problems, so it'd be useful if they have different issue numbers.
Sure. I'm open to adding one to psqldef while it's currently limited to mysqldef. Would you be interested in filing a pull request to add that to psqldef? |
@k0kubun Thank you for your confirmation.
It's nice to hear that. |
MATERIALIZED VIEW gets the same behavior as VIEW. --export output$ psqldef -Upostgres -hlocalhost -p5432 --export some_db
2023/10/28 11:30:44 found syntax error when parsing DDL "CREATE MATERIALIZED VIEW public.any_array AS SELECT 1 AS "?column?" WHERE (1 = ANY (ARRAY[1, 4, 5]))": syntax error at position 92 near '1' Input SQLCREATE MATERIALIZED VIEW any_array AS SELECT 1 WHERE 1 in (1, 4, 5); |
Hi, I hit into 2 cases of psqldef parse error on VIEW.
And, I extracted reproducible DDL for each one. They may look meaningless, but taken from actual use cases.
1 case is split into #455, as they have different causes.
I think
--skip-view
option would be helpful for an escape hatch, as table operation looks much stable and Views can beCREATE OR REPLACE
ed by psql.Platform
Syntax error on any(ARRAY[])
This issue describes a syntax error VIEW while it's valid for PostgreSQL.
--export output
Input SQL
PostgreSQL internally transforms this as follows:
The text was updated successfully, but these errors were encountered: