`UPDATE` statement with values from `SELECT` fails to parse
Opened this issue · 0 comments
valeneiko commented
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)