creating "a perfect sequence" column

Поиск
Список
Период
Сортировка
От Jack Brown
Тема creating "a perfect sequence" column
Дата
Msg-id 574173.92396.qm@web63905.mail.re1.yahoo.com
обсуждение исходный текст
Ответы Re: creating "a perfect sequence" column  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: creating "a perfect sequence" column  (Berend Tober <btober@ct.metrocast.net>)
Список pgsql-general
Dear list,

I need some tips and/or pointers to relevant documentation implementing (what I chose to call) "a perfect sequence"
i.e.a sequence that has no missing numbers in the sequence. I'd like it to auto increment on insert, and auto decrement
everythingbigger than its value on delete. There are many mechanisms (rules, triggers, sequences, locks etc.) but I'm
notsure which combination would result in the most elegant implementation. 

Oh, and if you know the right term for what I just described, I'd be more than pleased to hear it! :-)

All the best,
Jack





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: roll back to 8.1 for PyQt driver work-around
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: creating "a perfect sequence" column