Reserve a value in a serial type field

Поиск
Список
Период
Сортировка
От Albert
Тема Reserve a value in a serial type field
Дата
Msg-id 1168887437.639796.183720@v45g2000cwv.googlegroups.com
обсуждение исходный текст
Ответы Re: Reserve a value in a serial type field  (Shane Ambler <pgsql@007Marketing.com>)
Re: Reserve a value in a serial type field  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-general
Hi all. I have this issue: I need to load a value for an integer field
(with auto increment) which I implemented with a serial type and to
avoid inserts with that value in this field. The task is for a
distributed program I'm creating and I wonder if there is an efficient
solution for it.

I thought about setting the current value of the sequence when loading
the needed value..is it a solution? Is there something more efficient?

Thanks very much! Any help is appreciated!


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Glacially slow nested SELECT
Следующее
От: "Doug Cole"
Дата:
Сообщение: Re: Avoiding empty queries in tsearch