FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Go code generation fails for PostgreSQL ENUM values with '+' and '-' due to duplicate constant names · Issue #4515 · sqlc-dev/sqlc · GitHub

/ sqlc Public

Go code generation fails for PostgreSQL ENUM values with '+' and '-' due to duplicate constant names #4515

Description

Version

1.31.1

Version

  • sqlc: v1.31.1
  • PostgreSQL: 18x
  • Go: go1.26.1 windows/amd64

What happened?

When using a PostgreSQL ENUM that contains values with + and - (e.g. blood groups), sqlc generates duplicate Go constant names, causing the generated code to fail to compile.

For example:

CREATE TYPE blood_group_type AS ENUM (
    'A+',
    'A-',
    'B+',
    'B-',
    'AB+',
    'AB-',
    'O+',
    'O-'
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL