Skip to content

Support for Go 1.27 UUIDs #2636

Open
Open

Description

@F21

Is your feature request related to a problem? Please describe.
Go has a uuid package as part of std lib since 1.27 https://pkg.go.dev/uuid
It would be great if pgtype.UUID can return a std lib uuid directly.

Describe the solution you'd like
I am currently updating my projects to remove the google/uuid dependency in favor of the std lib uuid. As the std lib uuid implementation does not include Valuer or Scanner implementations, it is a bit unwieldy to work with when used with pgx results. I need to implement some boiler code to convert the [16]byte into a std lib uuid.

Describe alternatives you've considered
None.

Additional context
None.

Activity

  1. jackc commented on Aug 21, 2026

    @jackc
    Owner

    Any [16]byte is already supported, including the new uuid.UUID type. But the actual implementation of pgtype.UUID can't change until:

    1. Go 1.27 is the minimum supported version by pgx
    2. We figure out how to do it without a breaking change or we accept a breaking change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions