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

UPDATE statement with values from SELECT fails to parse #101

Open
valeneiko opened this issue Jun 29, 2022 · 0 comments
Open

UPDATE statement with values from SELECT fails to parse #101

valeneiko opened this issue Jun 29, 2022 · 0 comments

Comments

@valeneiko
Copy link

Parsing:

UPDATE foo
SET (c1, c2, c3) = (
    SELECT 1, 2, 3
);

Fails with:

Error: number of columns does not match number of values
    at Rule.postprocess (/src/node_modules/pgsql-ast-parser/src/syntax/main.ne:2165:23)
    at State.finish (/src/node_modules/nearley/lib/nearley.js:68:35)
    at Column.process (/src/node_modules/nearley/lib/nearley.js:92:23)
    at Parser.feed (/src/node_modules/nearley/lib/nearley.js:338:24)
    at _parse (/src/node_modules/pgsql-ast-parser/src/parser.ts:110:16)
    at doParse (/src/node_modules/pgsql-ast-parser/src/parser.ts:57:27)
    at Object.parse (/src/node_modules/pgsql-ast-parser/src/parser.ts:60:11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant