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. #2007

Closed
Hendler opened this issue Dec 25, 2022 · 1 comment
Closed

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

Hendler opened this issue Dec 25, 2022 · 1 comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed

Comments

@Hendler
Copy link

Hendler commented Dec 25, 2022

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

@Hendler Hendler added bug Something isn't working triage New issues that hasn't been reviewed labels Dec 25, 2022
@kyleconroy
Copy link
Collaborator

Migrated to sqlc-dev/sqlc-gen-python#4

@kyleconroy kyleconroy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed
Projects
None yet
Development

No branches or pull requests

2 participants