Re: [GENERAL] Buggered Sequence

From: "Jason C(dot) Wells" <jcwells(at)u(dot)washington(dot)edu>
To: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
Cc: pgsql-general(at)postgreSQL(dot)org, "Jason C(dot) Wells" <jcwells(at)u(dot)washington(dot)edu>
Subject: Re: [GENERAL] Buggered Sequence
Date: 1999-12-06 00:10:46
Message-ID: Pine.BSF.4.10.9912060010030.65356-100000@s8-37-26.student.washington.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1999-12-06 00:56:47 Oft Ask: How to contribute to PostgreSQL?
Previous Message Slavica Stefic 1999-12-05 23:03:53 Re: [GENERAL] null and =