Re: using sequences
| От | Ernest E Vogelsinger |
|---|---|
| Тема | Re: using sequences |
| Дата | |
| Msg-id | 5.1.1.6.2.20030613231141.03c04618@mail.vogelsinger.at обсуждение исходный текст |
| Ответ на | Re: using sequences (Thomas Kellerer <spam_eater@gmx.net>) |
| Список | pgsql-general |
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/
В списке pgsql-general по дате отправления: