using sequences

From: Erik Price <eprice(at)ptc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: using sequences
Date: 2003-06-13 20:26:47
Message-ID: 3EEA3387.80202@ptc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have read the manual about sequences and I thought I understood both
their purpose and how to use them. When I perform inserts, the sequence
is updated appropriately. However, I can't seem to directly access the
sequence myself. I always seem to get this message:

be_db=# select currval('news_news_id_seq');
ERROR: news_news_id_seq.currval is not yet defined in this session

Can someone explain what is going on?

Thank you,

Erik

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Maksim Likharev 2003-06-13 20:33:08 Re: return records in DB load order??
Previous Message scott.marlowe 2003-06-13 20:20:45 Re: Pg_dumpall