Skip to content

sqlInterpolate misses consecutive comments #329

@rnorberg

Description

@rnorberg

Example of the error:

sqlInterpolate(ANSI(), "
SELECT *
-- comment
-- consecutive comment with string literal character '
FROM mytable")
Error in sqlParseVariablesImpl(sql, list(sqlQuoteSpec("\"", "\""), sqlQuoteSpec("'",  :  Unterminated literal

Other examples that also result in sqlInterpolate mis-parsing consecutive comments:

sqlInterpolate(ANSI(), "
SELECT *
-- comment
-- consecutive comment with string literal character \"
FROM mytable")

sqlInterpolate(ANSI(), "
SELECT *
/* comment *//* consecutive comment with string literal character '*/
FROM mytable")

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