Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL()
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #1083: Insert query reordering interacts badly with NEXTVAL()/CURRVAL() |
| Дата | |
| Msg-id | 18400.1077601067@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | 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
|
| Список | pgsql-bugs |
"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. In fact, we specifically say
here:
http://www.postgresql.org/docs/7.4/static/sql-expressions.html#SYNTAX-EXPRESS-EVAL
that "The order of evaluation of subexpressions is not defined." To do
otherwise would put horrible crimps in our ability to optimize query plans.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера