Re: Using CTID system column as a "temporary" primary key - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Using CTID system column as a "temporary" primary key
Date
Msg-id 875C63FC-D302-4D2C-B546-FD0D957419F2@gmail.com
Whole thread Raw
In response to Re: Using CTID system column as a "temporary" primary key  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Responses Re: Using CTID system column as a "temporary" primary key  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
List pgsql-general
> 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
meanzero 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-specificfeatures. 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.







pgsql-general by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Do BRIN indexes support MIN/MAX?
Next
From: Francisco Olarte
Date:
Subject: Re: Using CTID system column as a "temporary" primary key