SERIAL type feature request

Поиск
Список
Период
Сортировка
От Zoltan Boszormenyi
Тема SERIAL type feature request
Дата
Msg-id 43920CE0.7050304@dunaweb.hu
обсуждение исходный текст
Ответы Re: SERIAL type feature request  (Tino Wildenhain <tino@wildenhain.de>)
Re: SERIAL type feature request  (Andrew Dunstan <andrew@dunslane.net>)
Re: SERIAL type feature request  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-hackers
Hi!

I would like to add an entry to PostgreSQL 8.2 TODO:
- Extend SERIAL to a full-featured auto-incrementer type.

To achieve this, the following three requirements should be fulfilled:

1. The statement parser should be able to handle this:

create table x (   id serial(N),   ...
);

and behind the scenes this would translate into the "create sequence ... 
start N"
before creating the table.

2. Upon INSERTing to a serial column, explicitly given 0 value or 
'default' keyword
or omitted field (implicit default) should be interchangeable.

3. When a serial field value is given in an INSERT or UPDATE statement
and the value is larger the the current value of the sequence then the 
sequence
should be modified accordingly.

This is the way Informix handles its serial type, although it doesn't seem
to have a visible sequence bound to the serial column.

Is it feasible in the 8.2 timeframe?

Thanks in advance,
Zoltán Böszörményi



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Reducing relation locking overhead
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: SERIAL type feature request