pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Forbid SJE with result relation
Date: Tue, 09 Jan 2024 08:02:42 +0000
Message-ID: <E1rN74M-000akK-70@gemulon.postgresql.org> (raw)

Forbid SJE with result relation

The target relation for INSERT/UPDATE/DELETE/MERGE has a different behavior
than other relations in EvalPlanQual() and RETURNING clause.  This is why we
forbid target relation to be either source or target relation in SJE.
It's not clear if we could ever support this.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/b9e8f460-f9a6-0e9b-e8ba-60d59f0bc22c%40gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8c441c082797f22ae96f50b641a8ef3f65c92b8d

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c     | 11 ++++
src/test/regress/expected/join.out            | 76 +++++++++++++++++----------
src/test/regress/expected/updatable_views.out | 17 +++---
src/test/regress/sql/join.sql                 | 28 +++++-----
4 files changed, 84 insertions(+), 48 deletions(-)



Message-ID: <E1rN74M-000akK-70@gemulon.postgresql.org>
Permalink:  ../E1rN74M-000akK-70@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rN74M-000akK-70@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Forbid SJE with result relation
  In-Reply-To: <E1rN74M-000akK-70@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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