public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrei Lepikhov <[email protected]>
To: Postgres hackers <[email protected]>
Subject: Specify description of the SpecialJoinInfo structure
Date: Tue, 26 Dec 2023 16:37:51 +0700
Message-ID: <[email protected]> (raw)

Hi,

Working on Asymmetric Join, I found slight inconsistency in the 
description of SpecialJoinInfo: join type JOIN_ANTI can be accompanied 
by a zero value of the ojrelid if this join was created by the 
transformation of the NOT EXISTS subquery.

-- 
regards,
Andrei Lepikhov
Postgres Professional
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
index ed85dc7414..189b59f127 100644
--- a/src/include/nodes/pathnodes.h
+++ b/src/include/nodes/pathnodes.h
@@ -2791,7 +2791,8 @@ typedef struct PlaceHolderVar
  *
  * ojrelid is the RT index of the join RTE representing this outer join,
  * if there is one.  It is zero when jointype is INNER or SEMI, and can be
- * zero for jointype ANTI (if the join was transformed from a SEMI join).
+ * zero for jointype ANTI (if the join was transformed from a SEMI join or
+ * converted from a sublink).
  * One use for this field is that when constructing the output targetlist of a
  * join relation that implements this OJ, we add ojrelid to the varnullingrels
  * and phnullingrels fields of nullable (RHS) output columns, so that the


Attachments:

  [text/plain] clarify_sjinfo_description.diff (806B, ../[email protected]/2-clarify_sjinfo_description.diff)
  download | inline diff:
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
index ed85dc7414..189b59f127 100644
--- a/src/include/nodes/pathnodes.h
+++ b/src/include/nodes/pathnodes.h
@@ -2791,7 +2791,8 @@ typedef struct PlaceHolderVar
  *
  * ojrelid is the RT index of the join RTE representing this outer join,
  * if there is one.  It is zero when jointype is INNER or SEMI, and can be
- * zero for jointype ANTI (if the join was transformed from a SEMI join).
+ * zero for jointype ANTI (if the join was transformed from a SEMI join or
+ * converted from a sublink).
  * One use for this field is that when constructing the output targetlist of a
  * join relation that implements this OJ, we add ojrelid to the varnullingrels
  * and phnullingrels fields of nullable (RHS) output columns, so that the


view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Specify description of the SpecialJoinInfo structure
  In-Reply-To: <[email protected]>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox