Skip to content

sql: SELECT ("*") parse oddities #1810

Description

@tbg

SELECT ("*") reproduces as SELECT (*), which isn't valid SQL.
On the other hand,
SELECT FROM t WHERE a = COUNT(*) is valid SQL.

In both cases, * is a QualifiedName{"a"} but for the first, the corresponding String() must be "*" (not *).

I've looked around for an obvious fix for this, but I'm thinking this is something that should be done at the grammar level by having * as a keyword of some sorts.

this, again, found by fuzzing. ping @dvyukov.

edit: even easier: SELECT "*" -> SELECT *.

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions