tree-sitter-sql icon indicating copy to clipboard operation
tree-sitter-sql copied to clipboard

Support composite values

Open pplam opened this issue 2 years ago • 0 comments

Supported composite values of the form:

(expression1, expression2, ...)

as an expression, and resolved the syntax conflicts.

The conflict is explained at https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-GROUPING-SETS as following

Note The construct (a, b) is normally recognized in expressions as a row constructor. Within the GROUP BY clause, this does not apply at the top levels of expressions, and (a, b) is parsed as a list of expressions as described above. If for some reason you need a row constructor in a grouping expression, use ROW(a, b).

Ref:
https://www.postgresql.org/docs/9.4/rowtypes.html

pplam avatar Jul 03 '22 17:07 pplam