Skip to content

Allow quotes in sqlc.embed #3999

Open
Open
@tvallotton

Description

@tvallotton

Version

1.29.0

What happened?

Hi, first off, thanks for the project! Secondly, at the moment sqlc.embed only allows identifiers in it, but it doesn't allow quoted identifiers, which are sometimes necessary. For example:

select sqlc.embed("user") from "user";

Which returns

test.sql:2:38: edited query syntax is invalid: syntax error at or near "user"

For this case user is a keyword in postgres so it needs to be quoted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions