Sequence-table association

Поиск
Список
Период
Сортировка
От Vamsee Koneru
Тема Sequence-table association
Дата
Msg-id Law11-F110oohEsH9Ie000871ef@hotmail.com
обсуждение исходный текст
Ответы Re: Sequence-table association
Список pgsql-novice
Hi All,

I don't know if this is the right place, but I have a question about
postgres sequences. Does anyone here know if there is a way to associate a
sequence with a table (for primary keys) so that when inserts are made in
the table even without using the sequence, its nextval is automatically
updated? Even the serial datatype doesn't help much because the sequence is
not auto-updated when it is not used.

So the bottomline of my problem is to be able to choose between having the
sequence generate a number for my primary key, and providing one myself
without ever getting yelled at for trying to insert a duplicate key.

Any ideas anyone?
TIA
Vamsee Koneru.

_________________________________________________________________
Bollywood's back! Will June keep up the tempo?
http://server1.msn.co.in/features/junemovies03/index.asp


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

Предыдущее
От: Reshat Sabiq
Дата:
Сообщение: Re: using a dumped database file
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Sequence-table association