Re: bug in setval? - Mailing list pgsql-hackers

From Joe Conway
Subject Re: bug in setval?
Date
Msg-id 3E6FFF9E.40504@joeconway.com
Whole thread Raw
In response to bug in setval?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne wrote:
> How do I set the sequence to have next value = 1?  Surely the bounds should
> begin at zero?
> 

No; see:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/functions-sequence.html

Notice the is_called flag. I think this does what you want:  SELECT setval('foo', 1, false);

Joe



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: bug in setval?
Next
From: Joe Conway
Date:
Subject: Re: SQL99 ARRAY support proposal