Re: creating "a perfect sequence" column
От | Berend Tober |
---|---|
Тема | Re: creating "a perfect sequence" column |
Дата | |
Msg-id | 48717274.3010709@ct.metrocast.net обсуждение исходный текст |
Ответ на | creating "a perfect sequence" column (Jack Brown <zidibik@yahoo.com>) |
Ответы |
Re: creating "a perfect sequence" column
|
Список | pgsql-general |
Jack Brown wrote: > 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! :-) > This question comes up a lot. A term used in prior discussions is "gapless sequence". What would be really more interesting for discussion on this community forum is a detailed description or your actual use case and requirements.
В списке pgsql-general по дате отправления: