At 23:03 13.06.2003, Thomas Kellerer said:
--------------------[snip]--------------------
>I think the other explenations where pretty good. However there *is* a way
>to retrieve the "current value" of sequence regardless whether nextval was
>called or not:
>
>SELECT last_value FROM news_news_id_seq;
--------------------[snip]--------------------
Yup, but it's not always 100% accurate - at the time you're receiving the
result set another process/connection could already have updated the value.
You don't have a guarantee of uniqueness when SELECTing (except you're
using some collaboration-unfriendly lock...)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/