Re: [Q] Sequences, last_value and inserts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [Q] Sequences, last_value and inserts
Дата
Msg-id 7214.1036184316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [Q] Sequences, last_value and inserts  ("Marie G. Tuite" <marie.tuite@edisonaffiliates.com>)
Список pgsql-general
"Marie G. Tuite" <marie.tuite@edisonaffiliates.com> writes:
> select last_value from domain_info_tbl_key_seq;
> This returns the same value as currval.

Au contraire --- the values are not necessarily the same, for exactly
the reason the OP was concerned about.  last_value will be the last
value any backend got from nextval(); currval is the last value *your*
backend got from nextval().

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Booth, Robert"
Дата:
Сообщение: Re: Update FROM clause?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: [Q] Sequences, last_value and inserts