Re: Switching Primary Keys to BigInt

From: "Ireneusz Pluta/wp(dot)pl" <ipluta(at)wp(dot)pl>
To: Mohamed Wael Khobalatte <mkhobalatte(at)grubhub(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Switching Primary Keys to BigInt
Date: 2020-07-22 20:45:07
Message-ID: 168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

W dniu 2020-07-21 o 17:30, Mohamed Wael Khobalatte pisze:
> we are planning to move some primary keys from int to bigint because we are approaching the type limit
If that does not break your business logic, you might arrange to use the negative half of the ::int
value range. Ugly, but this might at least buy you some time before finding the definite and elegant
way, if you are under some pressure. I do not recommend this, but this is what once saved my life
(or at least one night), after I realized that my PK already reached the limit :-).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mohamed Wael Khobalatte 2020-07-22 20:52:00 Re: Switching Primary Keys to BigInt
Previous Message MirrorX 2020-07-22 20:44:16 pglogical, replication_slots and going back in time