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

From David G. Johnston
Subject Re: bigint out of range
Date
Msg-id CAKFQuwb5r0oWP2NFBRmhKJAW3xzK2f6z9_UxxTCnRiRxjMt1uQ@mail.gmail.com
Whole thread Raw
In response to Re: bigint out of range  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Responses Re: bigint out of range
List pgsql-general
On Saturday, May 18, 2019, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
On 2019-05-16 08:48:51 -0700, David G. Johnston 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.

Or numeric(38, 0). I think it isn't coincidence that he tries to store
a 38-digit number in it.

You don’t perform math on a hash thus its not a number no matter that it may contain only digits.

David J.
 

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Loading table with indexed jsonb field is stalling
Next
From: Tom Lane
Date:
Subject: Re: Loading table with indexed jsonb field is stalling