pgsql: Reject MERGE in CTEs and COPY

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Reject MERGE in CTEs and COPY
Дата
Msg-id E1oMRtd-000PaK-Lj@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Reject MERGE in CTEs and COPY

The grammar added for MERGE inadvertently made it accepted syntax in
places that were not prepared to deal with it -- namely COPY and inside
CTEs, but invoking these things with MERGE currently causes assertion
failures or weird misbehavior in non-assertion builds.  Protect those
places by checking for it explicitly until somebody decides to implement
it.

Reported-by: Alexey Borzov <borz_off@cs.msu.su>
Discussion: https://postgr.es/m/17579-82482cd7b267b862@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/92af9143f13df8c54362ebbd4397cb53f207ff2d

Modified Files
--------------
src/backend/commands/copy.c         |  6 ++++++
src/backend/parser/parse_cte.c      |  7 +++++++
src/test/regress/expected/merge.out | 14 ++++++++++++++
src/test/regress/sql/merge.sql      | 10 ++++++++++
4 files changed, 37 insertions(+)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Fix _outConstraint() for "identity" constraints
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: MERGE docs adjustments