Search Postgresql Archives

Re: UUID type question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 18, 2022 at 3:24 PM Dominique Devienne <ddevienne@xxxxxxxxx> wrote:
> On Fri, Feb 18, 2022 at 3:06 PM Laura Smith
> <n5d9xq3ti233xiyif2vp@xxxxxxxxxxxxx> wrote:
> > Is there anything inherently "special" about the UUID type ? i.e. if I store a UUID in a text is it "worse" ?
>
> uuid is stored as 16 binary bytes.
> Store it as text, and that's 36 chars (assuming UTF-8, double-that in
> UTF-16, if that's possible in PG).
> Or encode it as base-62 instead of hexa (base-16, with dashes), to use
> only 22 chars as text (in UTF-8 or ASCII)

You might also be interested in KSUID, e.g. https://github.com/segmentio/ksuid





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux