Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python generation for Postgresql uses double quotes for enums. #4

Open
kyleconroy opened this issue Dec 28, 2022 · 0 comments
Open

Comments

@kyleconroy
Copy link
Contributor

Version

1.15.0

What happened?

Version is 1.16.

When creating an enum, and sql statements, the output of python adds double quotes which fails to execute.

Example

CREATE TYPE contact_type AS ENUM ('email', 'phone);

CREATE TABLE IF NOT EXISTS  identity (
    ID BIGSERIAL PRIMARY KEY,
    Username VARCHAR(128),
    ContactType contact_type
);

SELECT i.Username, i.ID
    FROM identity as i
    WHERE i.ContactType = 'email';

The above changes single quotes to double quotes, which fails to execute.

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

No response

What operating system are you using?

macOS

What database engines are you using?

PostgreSQL

What type of code are you generating?

Python

Originally reported here: sqlc-dev/sqlc#2007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant