Re: bigint out of range

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: bigint out of range
Дата
Msg-id 20190519135422.GF6197@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: bigint out of range  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Greetings,

* David G. Johnston (david.g.johnston@gmail.com) wrote:
> On Thu, May 16, 2019 at 8:31 AM Daulat Ram <Daulat.Ram@exponential.com>
> wrote:
>
> > url_hash        | bigint                  |           | not null |
>
> Change the type of url_hash; make it text instead of bigint.

Making it text wastes a bunch of space actually, since it's really a
binary value.  I tend to recommend using a bytea for storing hashes.
Given that hashes are really fixed width, it'd be nice if we had a set
of proper datatypes for them, perhaps not so much to avoid the 1-byte
overhead from storing as a variable-length bytea, but because we could
then avoid having a 7-byte hole due to padding if the hash is followed
by a bigint or such.

Thanks,

Stephen

Вложения

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

Предыдущее
От: Ron
Дата:
Сообщение: Re: bigint out of range
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: bigint out of range