Re: sequence, set value of - Mailing list pgsql-general

From zilch@home.se
Subject Re: sequence, set value of
Date
Msg-id 20010617205156.A16388@loony
Whole thread Raw
In response to Re: sequence, set value of  ("Tim Barnard" <tbarnard@povn.com>)
Responses Re: sequence, set value of  (GH <grasshacker@over-yonder.net>)
List pgsql-general
So, if I want the next insert to make the ID automatically 1, i can't use
SERIAL since that gives me a sequence of minvalue 1? Wich results in a id =
2 in the next insert.

Right?

Daniel Akerud

> select setval('sequencename',newvalue)
>
> See docs at: www.portgresql.org/idocs/index.php?sql-createsequence.html
>
> Tim
>
> ----- Original Message -----
> From: <zilch@home.se>
> To: <pgsql-general@postgresql.org>
> Sent: Sunday, June 17, 2001 10:36 AM
> Subject: [GENERAL] sequence, set value of
>
>
> >
> > Forgott how to set the value of a sequence,
> > please tell.
> >
> > Daniel Akerud
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
>
>



---
Daniel Åkerud, zilch@home.se








pgsql-general by date:

Previous
From: Randall Perry
Date:
Subject: Re: canned code to get db on web quickly via perl or PHP?
Next
From: zilch@home.se
Date:
Subject: Re: segfault i psql