Re: bigint out of range

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: bigint out of range
Date: 2019-05-16 15:48:51
Message-ID: CAKFQuwbA+5nycp=GHyn3kfX++iv7TqAHLKxrywqosMjbKSUh1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 16, 2019 at 8:31 AM Daulat Ram <Daulat(dot)Ram(at)exponential(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benedict Holland 2019-05-16 16:41:22 schema change tracking
Previous Message Geoff Winkless 2019-05-16 15:42:01 Re: bigint out of range