From: | "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br> |
---|---|
To: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "pgsql-sql" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Where is the sequence value? |
Date: | 2003-04-19 11:50:06 |
Message-ID: | 20030419114606.564CD4758C9@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
Hi all,
In my system, I use a sequence to enumerate a proccess list, and this sequence must be reseted each
year. I don't remember how it was created, but when I try to "setval('seq', 0)" I get a "out of bounds
(1, ...) error.
So, I set i to 1 ("setval('seq', 1)"), but in my system, when I try to insert a process, the nextval
() returns 2, not 1.
I was thinking to fix this dropping, e creating the sequence, but in my system, a lot o users have
permission to update the sequence (to use a nextval() on it), and I couldn't revoke they rights when I
drop it.
Insted, I search the docs about where sequence is definited, its min, max and current value, to
change the min value, setting it to 0, but I didn't found something.
(After a lot of text), my question is: how can I change the min value of a sequence without dropping
it?
Thanks for all,
[]'s
Edipo Elder F. de Melo
[edipoelder(at)ig(dot)com(dot)br]
[ ICQ#: 4546070 ]
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Seichter | 2003-04-19 14:30:32 | OT: Why elefant? |
Previous Message | Rohitashva Sharma | 2003-04-19 10:14:50 | Database server in recovery mode |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Brown | 2003-04-19 13:01:46 | Re: [SQL] Yet Another (Simple) Case of Index not used |
Previous Message | Rajesh Kumar Mallah | 2003-04-19 07:08:08 | Re: apparent problem with a PL |