Re: How to migrate column type from uuid to serial

Поиск
Список
Период
Сортировка
От Hemil Ruparel
Тема Re: How to migrate column type from uuid to serial
Дата
Msg-id CANW1aT_DQq5-cBL+1MCbd=hncUwJ3QWk-NWoVpwFxj=RR20hUg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to migrate column type from uuid to serial  (Thomas Kellerer <shammat@gmx.net>)
Ответы Re: How to migrate column type from uuid to serial  (Thomas Kellerer <shammat@gmx.net>)
Re: How to migrate column type from uuid to serial  (Hemil Ruparel <hemilruparel2002@gmail.com>)
Re: How to migrate column type from uuid to serial  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
Sorry if this is silly but if it is a 128 bit number, why do we need 32 characters to represent it? Isn't 8 bits one byte?

On Wed, Oct 7, 2020 at 8:08 PM Thomas Kellerer <shammat@gmx.net> wrote:
Hemil Ruparel schrieb am 07.10.2020 um 16:21:
> it is declared as uuid. But how does it occupy only 16 bytes?

Because a UUID is internally simply a 128bit number - the dashes you see are just formatting.

But if you can only send the text represnation, then yes 32 characters aren't enough.


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: How to migrate column type from uuid to serial
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Handling time series data with PostgreSQL