Re: [GENERAL] Buggered Sequence

Поиск
Список
Период
Сортировка
От Jason C. Wells
Тема Re: [GENERAL] Buggered Sequence
Дата
Msg-id Pine.BSF.4.10.9912060010030.65356-100000@s8-37-26.student.washington.edu
обсуждение исходный текст
Ответ на Re: [GENERAL] Buggered Sequence  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
Список pgsql-general
On Sat, 4 Dec 1999, Ross J. Reedstrom wrote:

>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.

Hmmm. Thanks for the tip. It looks like I will have to dig a little deeper
into postgres.

Thank You,     | http://students.washington.edu/jcwells/
Jason Wells


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

Предыдущее
От: Slavica Stefic
Дата:
Сообщение: Re: [GENERAL] null and =
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Oft Ask: How to contribute to PostgreSQL?