From: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
---|---|
To: | Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Kirk Wolak <wolakk(at)gmail(dot)com>, Geoff Winkless <pgsqladmin(at)geoff(dot)dj>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Using CTID system column as a "temporary" primary key |
Date: | 2023-03-29 20:16:41 |
Message-ID: | CA+bJJbyHnwd=VM0dXDh87mhQj+mRS75+tMKqVuwmK3zZ1DJ1nQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 29 Mar 2023 at 21:11, Sebastien Flaesch
<sebastien(dot)flaesch(at)4js(dot)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.
NONONO please! Someone already pointed a sequence can generate zero,
but even without that some of us may need to insert 0 ( i.e. because
we deleted the row with the zero-id and want recreate it or just
because, even if the default-generating sequence does not spit zeroes,
the PHB wants us to insert is employee-record with ID=0 or other
reasons). AFAIK serial just creates an integer column with a default,
doc (8.1) says its range is from 1, but I'm not even sure this is
enforced, when I've looked at the description of a serial column I do
not remember seeing anything more then the default, so you could
probably insert negatives. I , and I suspect others, would prefer to
be able to insert any int than copying a hacky ( and I suspect non
standard ) trick from informix.
Just write to informix and suggest them to implement DEFAULT on
inserts, it is much better ;-> . Being more informix-compatible may
sound as a feature to yoy, to me it sounds like a misfeature, like
needing DUAL to be more oracle-compatible.
Francisco Olarte.
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Olarte | 2023-03-29 20:46:24 | Re: Do BRIN indexes support MIN/MAX? |
Previous Message | Alban Hertroys | 2023-03-29 20:15:48 | Re: Using CTID system column as a "temporary" primary key |