using sequences - Mailing list pgsql-general

From Erik Price
Subject using sequences
Date
Msg-id 3EEA3387.80202@ptc.com
Whole thread Raw
Responses Re: using sequences  (weigelt@metux.de)
Re: using sequences  (Ernest E Vogelsinger <ernest@vogelsinger.at>)
Re: using sequences  (Bruno Wolff III <bruno@wolff.to>)
Re: using sequences  (Thomas Kellerer <spam_eater@gmx.net>)
Re: using sequences  (Tino Wildenhain <tino@wildenhain.de>)
List 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


pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Index not being used in MAX function (7.2.3)
Next
From: "scott.marlowe"
Date:
Subject: Re: Postgres performance comments from a MySQL user