Re: Using CTID system column as a "temporary" primary key

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: Using CTID system column as a "temporary" primary key
Дата
Msg-id CA+bJJbyHnwd=VM0dXDh87mhQj+mRS75+tMKqVuwmK3zZ1DJ1nQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using CTID system column as a "temporary" primary key  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Список pgsql-general
On Wed, 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.

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.



В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Using CTID system column as a "temporary" primary key
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Do BRIN indexes support MIN/MAX?