Re: bigint out of range

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: bigint out of range
Дата
Msg-id CAKFQuwbA+5nycp=GHyn3kfX++iv7TqAHLKxrywqosMjbKSUh1w@mail.gmail.com
обсуждение исходный текст
Ответ на bigint out of range  (Daulat Ram <Daulat.Ram@exponential.com>)
Ответы Re: bigint out of range  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Re: bigint out of range  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
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.

As a bonus:

Use text instead of arbitrary varchar(4000) fields and add, e.g., check (length(url) < 4000) or something better.

Needing 38 digit integers for "id" fields seems odd.

Not sure what kind of date would need 128 characters to represent; ideally you'd just make that a  "date" typed field and normalize on input.

David J.

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

Предыдущее
От: Geoff Winkless
Дата:
Сообщение: Re: bigint out of range
Следующее
От: Benedict Holland
Дата:
Сообщение: schema change tracking