Re: setting serial start value - Mailing list pgsql-general

From Greg Philpott
Subject Re: setting serial start value
Date
Msg-id 68891ECF-8606-4F36-B292-7B38825E4F5D@mdialogue.com
Whole thread Raw
In response to Re: setting serial start value  (Michael Fuhr <mike@fuhr.org>)
Responses Re: setting serial start value
List pgsql-general
Hi Michael, from terminal in psql I enter
# ALTER SEQUENCE public.users MINVALUE 9999;
But it doesn't  work. I don't think I am specifying the field
correctly. the schema is public, the table is users, the field is id.
Thanks,
Greg
On 20-Jul-06, at 10:49 PM, Michael Fuhr wrote:

> On Thu, Jul 20, 2006 at 09:32:56PM -0400, Greg Philpott wrote:
>> I have a table with a field called "id" that is a serial field and
>> pkey. I would like to set the the sequence to start at 10000 and
>> increase sequentially from there but I can't seem to get that to
>> work. any suggestions are greatly appreciated.
>
> What have you tried?  ALTER SEQUENCE or setval() should work.
>
> http://www.postgresql.org/docs/7.4/interactive/sql-altersequence.html
> http://www.postgresql.org/docs/7.4/interactive/functions-sequence.html
>
> --
> Michael Fuhr


pgsql-general by date:

Previous
From: "Jasbinder Bali"
Date:
Subject: ECPG (usage of simple select statement)
Next
From: Michael Fuhr
Date:
Subject: Re: setting serial start value