pgsql: Forbid SJE with result relation - Mailing list pgsql-committers

From Alexander Korotkov
Subject pgsql: Forbid SJE with result relation
Date
Msg-id E1rN74M-000akK-70@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Alexander Korotkov
Date:
Subject: pgsql: Fix misuse of RelOptInfo.unique_for_rels cache by SJE
Next
From: Alexander Korotkov
Date:
Subject: pgsql: An addition to 8c441c08279