pgsql: Behave correctly if INSERT ... VALUES is decorated with addition

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Behave correctly if INSERT ... VALUES is decorated with addition
Дата
Msg-id E1P2C3B-0006t4-Ts@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Behave correctly if INSERT ... VALUES is decorated with additional clauses.

In versions 8.2 and up, the grammar allows attaching ORDER BY, LIMIT,
FOR UPDATE, or WITH to VALUES, and hence to INSERT ... VALUES.  But the
special-case code for VALUES in transformInsertStmt() wasn't expecting any
of those, and just ignored them, leading to unexpected results.  Rather
than complicate the special-case path, just ensure that the presence of any
of those clauses makes us treat the query as if it had a general SELECT.
Per report from Hitoshi Harada.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=392c66f184dc4e70ff399b223724c4c03b59cb7d

Modified Files
--------------
src/backend/parser/analyze.c |   10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Behave correctly if INSERT ... VALUES is decorated with addition
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Behave correctly if INSERT ... VALUES is decorated with addition