pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Judith <jaltamirano@correolux.com.mx>
To: pgsql-sql@postgresql.org
Subject: Sequences problem
Date: Fri, 17 Aug 2007 16:33:04 -0500
Message-ID: <46C61410.4070407@correolux.com.mx> (raw)

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




view thread (3+ messages)  latest in thread

Message-ID: <46C61410.4070407@correolux.com.mx>
Permalink:  ../46C61410.4070407@correolux.com.mx/
Also on:    postgresql.org/message-id/46C61410.4070407@correolux.com.mx

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jaltamirano@correolux.com.mx
  Subject: Re: Sequences problem
  In-Reply-To: <46C61410.4070407@correolux.com.mx>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox