Re: setting serial start value

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Greg Philpott <gphilpott(at)mdialogue(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: setting serial start value
Date: 2006-07-21 02:49:23
Message-ID: 20060721024923.GA38451@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasbinder Bali 2006-07-21 03:28:16 ECPG (usage of simple select statement)
Previous Message Greg Philpott 2006-07-21 01:32:56 setting serial start value