Re: Behavior of nextval() and currval()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Behavior of nextval() and currval()
Дата
Msg-id 3099.1005677613@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Behavior of nextval() and currval()  (Mike Mascari <mascarm@mascari.com>)
Список pgsql-general
Mike Mascari <mascarm@mascari.com> writes:
> I've switched to using a CREATE TEMPORARY TABLE AS SELECT..,
> INSERT..SELECT to avoid the scenario.

Uh, you mean something like

    select a, a from (select nextval('foo') as a) as b;

That might surprise you even more :-(

Perhaps the planner shouldn't pull up subqueries whose targetlists
include any noncachable functions.  This needs more thought.

            regards, tom lane

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

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: Behavior of nextval() and currval()
Следующее
От: Mike Mascari
Дата:
Сообщение: Re: Behavior of nextval() and currval()