Re: [GENERAL] Buggered Sequence

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: [GENERAL] Buggered Sequence
Дата
Msg-id 19991204160848.B19842@rice.edu
обсуждение исходный текст
Ответ на Re: [GENERAL] Buggered Sequence  (Jesse Kipp <jesse@revbox.com>)
Ответы Re: [GENERAL] Buggered Sequence
Список pgsql-general
Jason -
Jesse's sugestion should work, but there's a setval() function for
this exact use:

SELECT setval('people_id_seq',44);

I usually use it like this:

SELECT setval('"Experiments_ExptID_seq"',max("ExptID")) from "Experiments";

That automatically sets the sequence value to the current max in the table.

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005

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

Предыдущее
От: Jesse Kipp
Дата:
Сообщение: Re: [GENERAL] Buggered Sequence
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [GENERAL] PostgreSQL 6.5.3 on SuSE 6.1