Re: bug in setval?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug in setval?
Date: 2003-03-13 03:48:46
Message-ID: 3E6FFF9E.40504@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-03-13 04:01:57 Re: SQL99 ARRAY support proposal
Previous Message Christopher Kings-Lynne 2003-03-13 03:21:31 bug in setval?