Re: UUID type question

Поиск
Список
Период
Сортировка
От Dominique Devienne
Тема Re: UUID type question
Дата
Msg-id CAFCRh-9Ud7q+y2+Oh9v5U4tGzUyca096=7e_s8nwmhR_8yTeDQ@mail.gmail.com
обсуждение исходный текст
Ответ на UUID type question  (Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>)
Ответы Re: UUID type question  (Dominique Devienne <ddevienne@gmail.com>)
Список pgsql-general
On Fri, Feb 18, 2022 at 3:06 PM Laura Smith
<n5d9xq3ti233xiyif2vp@protonmail.ch> 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)



В списке pgsql-general по дате отправления:

Предыдущее
От: Laura Smith
Дата:
Сообщение: UUID type question
Следующее
От: Dominique Devienne
Дата:
Сообщение: Re: UUID type question