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>
Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL() Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #1083: Insert query reordering interacts badly with "Martin Langhoff (Catalyst IT)" <martin@catalyst.net.nz>
Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL() Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #1083: Insert query reordering interacts badly with Martin Langhoff <martin@catalyst.net.nz>
Re: BUG #1083: Insert query reordering interacts badly with Bruno Wolff III <bruno@wolff.to>
Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL() Bruno Wolff III <bruno@wolff.to>
On Mon, Feb 23, 2004 at 21:26:57 -0400,
  PostgreSQL Bugs List  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
Дата:
От: Tom Lane
Дата:
FAQ