X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AE173475F6A for ; Sat, 19 Apr 2003 07:46:11 -0400 (EDT) Received: from smtp-29.ig.com.br (smtp-29.ig.com.br [200.226.132.157]) by postgresql.org (Postfix) with SMTP id 564CD4758C9 for ; Sat, 19 Apr 2003 07:46:06 -0400 (EDT) Received: (qmail 25086 invoked from network); 19 Apr 2003 11:46:12 -0000 Received: from unknown (HELO ignis) (200.151.211.143) by smtp-29.ig.com.br with SMTP; 19 Apr 2003 11:46:12 -0000 From: "Edipo E. F. Melo" To: "pgsql-admin@postgresql.org" , "pgsql-sql" Date: Sat, 19 Apr 2003 08:50:06 -0300 Reply-To: "Edipo E. F. Melo" X-Mailer: PMMail 2000 Professional (2.20.2360) For Windows 98 (4.10.2222) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Where is the sequence value? Message-Id: <20030419114606.564CD4758C9@postgresql.org> X-Spam-Status: No, hits=-5.8 required=5.0 tests=BAYES_10 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/270 X-Sequence-Number: 8425 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@ig.com.br] [ ICQ#: 4546070 ]