Skip to content

IDENTIFIER literal with double quotes inside single quotes is parsed as one token instead of multiple identifiers #2048

@barsela1

Description

@barsela1

When running the following statement:

CREATE TABLE IDENTIFIER('"ORGDATA"."PUBLIC"."car_sales"')

the parser produces:

SingleQuotedString(""ORGDATA"."PUBLIC"."car_sales"")

It is treated as a single token (a literal string) instead of being parsed into three separate identifiers ("ORGDATA", "PUBLIC", "car_sales").
Since the IDENTIFIER function expects a literal, the content must be re-parsed.

Suggestions:

  1. Expose a function that can take a SingleQuotedString like: '"ORGDATA"."PUBLIC"."car_sales"' and re-parse it into separate Ident tokens (ORGDATA, PUBLIC, car_sales).

  2. change the tokenizer so that when IDENTIFIER is used with a quoted string containing double quotes, the inner content is tokenized as identifiers rather than treated as a raw single string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions