pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alban Hertroys <haramrae@gmail.com>
To: Sebastien Flaesch <sebastien.flaesch@4js.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Kirk Wolak <wolakk@gmail.com>
Cc: Geoff Winkless <pgsqladmin@geoff.dj>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Using CTID system column as a "temporary" primary key
Date: Wed, 29 Mar 2023 22:15:48 +0200
Message-ID: <875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com> (raw)
In-Reply-To: <AM9P191MB1286CE763D59D8B821F69409B0899@AM9P191MB1286.EURP191.PROD.OUTLOOK.COM>
References: <DBAP191MB12891F47802C3674F77BF751B0889@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
	<CAEzk6feEGHzS_TexvevFmWhsYt7MYhUUEUE54stO7SPNbL_Ypg@mail.gmail.com>
	<DBAP191MB1289536BFF22FD8BD5FFEC61B0889@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
	<CACLU5mQ2XMd5c4tetUHacVE538c8nd1t2CWSfDvis2GCKg0L9A@mail.gmail.com>
	<DBAP191MB1289D8F0F4A8CB1423ADB05FB0899@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
	<b121c195-8122-3167-5e33-3bd325702df5@aklaver.com>
	<AM9P191MB1286CE763D59D8B821F69409B0899@AM9P191MB1286.EURP191.PROD.OUTLOOK.COM>


> On 29 Mar 2023, at 21:11, Sebastien Flaesch <sebastien.flaesch@4js.com> wrote:
> 
> Oh the use of default keyword is new to me, thanks for that.
> 
> But to make PostgreSQL more Informix-compatible, zero should have been considered as well.

…No, I’m not going to be humble about this opinion… Postgres does a sane thing here.
It’s Informix that you should be complaining about. Zero is not a sane value to specify special behaviour, it could mean zero and be just as valid. By consequence, Informix probably forbids zero as a sequence value, but that is an artefact (and a limitation) of its implementation, not a feature.

The core of your problem however, is that you’re trying to get database-agnostic behaviour by relying on database-specific features. That is not going to work, you’ve just been lucky enough to get away with it until now.

There’s really only one realistic answer here: Fix your design.

Regards,
Alban Hertroys
--
There is always an exception to always.









view thread (28+ messages)  latest in thread

Message-ID: <875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com>
Permalink:  ../875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com/
Also on:    postgresql.org/message-id/875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com

 · 

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: haramrae@gmail.com, sebastien.flaesch@4js.com, adrian.klaver@aklaver.com, wolakk@gmail.com, pgsqladmin@geoff.dj
  Subject: Re: Using CTID system column as a "temporary" primary key
  In-Reply-To: <875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com>
  References: <DBAP191MB12891F47802C3674F77BF751B0889@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <CAEzk6feEGHzS_TexvevFmWhsYt7MYhUUEUE54stO7SPNbL_Ypg@mail.gmail.com> <DBAP191MB1289536BFF22FD8BD5FFEC61B0889@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <CACLU5mQ2XMd5c4tetUHacVE538c8nd1t2CWSfDvis2GCKg0L9A@mail.gmail.com> <DBAP191MB1289D8F0F4A8CB1423ADB05FB0899@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <b121c195-8122-3167-5e33-3bd325702df5@aklaver.com> <AM9P191MB1286CE763D59D8B821F69409B0899@AM9P191MB1286.EURP191.PROD.OUTLOOK.COM> <875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com>

* 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