Re: key = currval('tab_key_seq') choses SEQSCAN?!

Поиск
Список
Период
Сортировка
От Eric B.Ridge
Тема Re: key = currval('tab_key_seq') choses SEQSCAN?!
Дата
Msg-id 9D0E600A-6803-11D8-9391-000A95D98B3E@tcdi.com
обсуждение исходный текст
Ответ на Re: key = currval('tab_key_seq') choses SEQSCAN?!  (Joe Conway <mail@joeconway.com>)
Ответы Re: key = currval('tab_key_seq') choses SEQSCAN?!  (Joe Conway <mail@joeconway.com>)
Список pgsql-general
On Feb 25, 2004, at 9:07 PM, Joe Conway wrote:

> Eric B.Ridge wrote:
>> I suppose this is obvious, but it's volatile because *other* backends
>> can change it while the current transaction is still in progress?
>
> No. Other backends don't affect currval, but your own might on a
> row-by-row basis. Consider:

gotcha.  Stated differently, it's not volatile because, by design, it
doesn't always produce the same output for the same input.

> regression=# select nextval('seq'), currval('seq'), s from
> generate_series(1,4) as t(s);

OT:  generate_series looks useful.  Is this only in 7.5?

eric


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: key = currval('tab_key_seq') choses SEQSCAN?!
Следующее
От: Shelby Cain
Дата:
Сообщение: Re: select statement against pg_stats returns inconsistent data