Re: [GENERAL] Buggered Sequence - Mailing list pgsql-general

From Jason C. Wells
Subject Re: [GENERAL] Buggered Sequence
Date
Msg-id Pine.BSF.4.10.9912060010030.65356-100000@s8-37-26.student.washington.edu
Whole thread Raw
In response to Re: [GENERAL] Buggered Sequence  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
List 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 by date:

Previous
From: Slavica Stefic
Date:
Subject: Re: [GENERAL] null and =
Next
From: The Hermit Hacker
Date:
Subject: Oft Ask: How to contribute to PostgreSQL?