Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()
Дата
Msg-id 20040224021117.GA29715@wolff.to
обсуждение исходный текст
Ответ на BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
Список pgsql-bugs
On Mon, Feb 23, 2004 at 21:26:57 -0400,
  PostgreSQL Bugs List <pgsql-bugs@postgresql.org> wrote:
>
> Details:
>
> === SQL ===
>
> CREATE TEMP TABLE testing (col_a integer, col_b integer);
> CREATE TEMP SEQUENCE seq;
>
> /* this statement will produce the expected result */
> INSERT INTO testing (col_a, col_b) VALUES (NEXTVAL('seq'), CURRVAL('seq'));
>
> /* this statement will reverse the order of CURRVAL()/NEXTVAL() to match the
> column order of the table */
> INSERT INTO testing (col_b, col_a) VALUES (NEXTVAL('seq'), CURRVAL('seq'));

I don't think an order of evaluation is guarenteed for INSERT VALUE lists.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Crash when calling a pl/pgsql function with no row to pass as an argument
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()