Re: BUG #1083: Insert query reordering interacts badly with

Поиск
Список
Период
Сортировка
От Martin Langhoff (Catalyst IT)
Тема Re: BUG #1083: Insert query reordering interacts badly with
Дата
Msg-id 403AF354.5030901@catalyst.net.nz
обсуждение исходный текст
Ответ на Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:

>"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
>
>
>>/* 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'));
>>
>>
>
>This is not a bug.  The order of evaluation of select-lists and
>values-lists is not defined anywhere in the SQL standard, nor promised
>anywhere in the Postgres documentation.
>
Thanks for the clarification. I am curious, however: I can't find a
means to achieve the same effect in a deterministic manner. Any pointers?

regards,




martin

--
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224                              MOB: +64(21)364-017
      Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------

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

Предыдущее
От: "ronen"
Дата:
Сообщение: Can't do any operation with the Server.
Следующее
От: "Gary WAN"
Дата:
Сообщение: The syntax about CREATE DOMAIN