pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ireneusz Pluta/wp.pl <ipluta@wp.pl>
To: Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>
To: pgsql-general@postgresql.org
Subject: Re: Switching Primary Keys to BigInt
Date: Wed, 22 Jul 2020 22:45:07 +0200
Message-ID: <168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl> (raw)
In-Reply-To: <CABZeWdybDVTgCQFZf0jDtj0p4yLxNrYd8aw61iFxY-Xt+fqPkw@mail.gmail.com>
References: <CABZeWdybDVTgCQFZf0jDtj0p4yLxNrYd8aw61iFxY-Xt+fqPkw@mail.gmail.com>

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 :-).





view thread (17+ messages)  latest in thread

Message-ID: <168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl>
Permalink:  ../168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl/
Also on:    postgresql.org/message-id/168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ipluta@wp.pl, mkhobalatte@grubhub.com
  Subject: Re: Switching Primary Keys to BigInt
  In-Reply-To: <168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl>
  References: <CABZeWdybDVTgCQFZf0jDtj0p4yLxNrYd8aw61iFxY-Xt+fqPkw@mail.gmail.com> <168ca1b5-62bb-b210-bcd0-e1a9faacf728@wp.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox