From: | zilch(at)home(dot)se |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: sequence, set value of |
Date: | 2001-06-17 18:51:56 |
Message-ID: | 20010617205156.A16388@loony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)home(dot)se>
> To: <pgsql-general(at)postgresql(dot)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(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
> >
>
>
---
Daniel Åkerud, zilch(at)home(dot)se
From | Date | Subject | |
---|---|---|---|
Next Message | Randall Perry | 2001-06-17 19:13:16 | Re: canned code to get db on web quickly via perl or PHP? |
Previous Message | Peter Eisentraut | 2001-06-17 18:31:23 | Re: segfault i psql |