pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Reject MERGE in CTEs and COPY 2+ messages / 1 participants [nested] [flat]
* pgsql: Reject MERGE in CTEs and COPY @ 2022-08-12 10:28 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2022-08-12 10:28 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Reject MERGE in CTEs and COPY @ 2022-08-12 10:28 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2022-08-12 10:28 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/455d254d22665eb7af3b714435f3fecc63696cc7 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(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-08-12 10:28 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-08-12 10:28 pgsql: Reject MERGE in CTEs and COPY Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-08-12 10:28 pgsql: Reject MERGE in CTEs and COPY Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox