Re: bigint out of range - Mailing list pgsql-general

From David G. Johnston
Subject Re: bigint out of range
Date
Msg-id CAKFQuwbA+5nycp=GHyn3kfX++iv7TqAHLKxrywqosMjbKSUh1w@mail.gmail.com
Whole thread Raw
In response to bigint out of range  (Daulat Ram <Daulat.Ram@exponential.com>)
Responses Re: bigint out of range
Re: bigint out of range
List 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 by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: bigint out of range
Next
From: Benedict Holland
Date:
Subject: schema change tracking