libpg_query icon indicating copy to clipboard operation
libpg_query copied to clipboard

Parser incorrectly parses queries with negative and zero values

Open MGorkov opened this issue 10 months ago • 0 comments

The following queries produces an invalid tree when run through the parser : SELECT 0; SELECT -1;

Parser output: { version: 160001, stmts: [ { stmt: { SelectStmt: { targetList: [ { ResTarget: { val: { A_Const: { ival: {}, location: 7 } }, location: 7 } } ], limitOption: 'LIMIT_OPTION_DEFAULT', op: 'SETOP_NONE' } } } ] } In version 15 these queries also produce incorrect tree, but version 14 is correct.

MGorkov avatar Apr 16 '24 05:04 MGorkov