Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 29B9B9FB721 for ; Fri, 17 Aug 2007 18:32:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 21928-03 for ; Fri, 17 Aug 2007 18:31:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from CORREO.correolux.com.mx (customer-200-79-53-218.uninet-ide.com.mx [200.79.53.218]) by postgresql.org (Postfix) with ESMTP id B09659FB71F for ; Fri, 17 Aug 2007 18:31:56 -0300 (ADT) Received: from [192.168.7.58] ([192.168.7.58]) by correolux.com.mx with MailEnable ESMTP; Fri, 17 Aug 2007 16:31:57 -0500 Message-ID: <46C61410.4070407@correolux.com.mx> Date: Fri, 17 Aug 2007 16:33:04 -0500 From: Judith User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Sequences problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.146 tagged_above=0 required=5 tests=AWL=0.045, BAYES_50=0.001, RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 200708/148 X-Sequence-Number: 29086 Hello everybody, I have a question related with sequences............. When I init a sesion with my db, if a do the next sentence: SELECT currval('pagos_id_pago_seq'); return this: ERROR: the relation doesn't exist (or somethimg like that, because the message is in spanish) but if I do first, SELECT nextval('pagos_id_pago_seq'); and then SELECT currval('pagos_id_pago_seq'); it success, returns the current sequence value, it is possible to indicate that the sequence is already started and in the value 4567 but I need first to now the current value before the next, how can I do? Thanks in advanced