VADOSWARE / pg_idkit

Postgres extension for generating UUIDs
https://vadosware.io/post/introducing-pg-idkit/
Apache License 2.0
366 stars 8 forks source link

Feature: Add ability to use the uuid type for some of the id types (rather than text) #11

Closed dlight closed 1 year ago

dlight commented 1 year ago

Context

Per this discussion, this extension uses text rather than uuid for ulid and other identifiers with the same size of uuid. It appears this would introduce some size overhead.

Proposal

I think that ulid, uuidv6, uuidv7, etc. should use the uuid postgres type.

Alternatives

Keep it as is? It appears one can generate as text and then convert to uuid later.

t3hmrman commented 1 year ago

Hey @dlight agreed -- adding _uuid functions (and maybe shifting the naming scheme somewhat or adding one that is easier to guess/predict that produces textvs uuid is something that should be done.