Description of ForeignPath

Started by Amit Langoteover 9 years ago5 messages
#1Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
1 attachment(s)

Is the following description now outdated:

"ForeignPath represents a potential scan of a foreign table"

Considering that there now exists FdwRoutine.GetForeignJoinPaths() whose
product is nothing else but a ForeignPath, should it now say (patch attached):

"ForeignPath represents a potential scan of foreign table(s)"

Or something better.

Thanks,
Amit

Attachments:

foreignpath-desc.patchtext/x-diff; name=foreignpath-desc.patchDownload
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index e9dfb66..b11f29f 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -1030,7 +1030,7 @@ typedef struct SubqueryScanPath
 } SubqueryScanPath;
 
 /*
- * ForeignPath represents a potential scan of a foreign table
+ * ForeignPath represents a potential scan of foreign table(s)
  *
  * fdw_private stores FDW private data about the scan.  While fdw_private is
  * not actually touched by the core code during normal operations, it's
#2Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Amit Langote (#1)
Re: Description of ForeignPath

On 2016/04/18 17:31, Amit Langote wrote:

Is the following description now outdated:

"ForeignPath represents a potential scan of a foreign table"

Considering that there now exists FdwRoutine.GetForeignJoinPaths() whose
product is nothing else but a ForeignPath, should it now say (patch attached):

"ForeignPath represents a potential scan of foreign table(s)"

Or something better.

I think it'd be better to match the comment with that for
create_foreignscan_path(). So how about "ForeignPath represents a
potential scan of a foreign table, foreign join, or foreign
upper-relation processing"? I think we would probably need to update
the comment in src/backend/optimizer/README (L358), too.

Best regards,
Etsuro Fujita

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Etsuro Fujita (#2)
1 attachment(s)
Re: Description of ForeignPath

Fujita-san,

On 2016/04/20 16:20, Etsuro Fujita wrote:

On 2016/04/18 17:31, Amit Langote wrote:

Is the following description now outdated:

"ForeignPath represents a potential scan of a foreign table"

Considering that there now exists FdwRoutine.GetForeignJoinPaths() whose
product is nothing else but a ForeignPath, should it now say (patch
attached):

"ForeignPath represents a potential scan of foreign table(s)"

Or something better.

I think it'd be better to match the comment with that for
create_foreignscan_path(). So how about "ForeignPath represents a
potential scan of a foreign table, foreign join, or foreign upper-relation
processing"? I think we would probably need to update the comment in
src/backend/optimizer/README (L358), too.

That's a lot better. Updated patch attached.

Thanks,
Amit

Attachments:

foreignpath-desc-2.patchtext/x-diff; name=foreignpath-desc-2.patchDownload
diff --git a/src/backend/optimizer/README b/src/backend/optimizer/README
index 5e12459..2407172 100644
--- a/src/backend/optimizer/README
+++ b/src/backend/optimizer/README
@@ -355,7 +355,7 @@ RelOptInfo      - a relation or joined relations
   BitmapHeapPath - top of a bitmapped index scan
   TidPath       - scan by CTID
   SubqueryScanPath - scan a subquery-in-FROM
-  ForeignPath   - scan a foreign table
+  ForeignPath   - scan a foreign table, foreign join or foreign upper-relation
   CustomPath    - for custom scan providers
   AppendPath    - append multiple subpaths together
   MergeAppendPath - merge multiple subpaths, preserving their common sort order
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index e9dfb66..45739c3 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -1030,7 +1030,8 @@ typedef struct SubqueryScanPath
 } SubqueryScanPath;
 
 /*
- * ForeignPath represents a potential scan of a foreign table
+ * ForeignPath represents a potential scan of a foreign table, foreign join
+ * or foreign upper-relation.
  *
  * fdw_private stores FDW private data about the scan.  While fdw_private is
  * not actually touched by the core code during normal operations, it's
#4Robert Haas
robertmhaas@gmail.com
In reply to: Amit Langote (#3)
Re: Description of ForeignPath

On Wed, Apr 20, 2016 at 3:37 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:

I think it'd be better to match the comment with that for
create_foreignscan_path(). So how about "ForeignPath represents a
potential scan of a foreign table, foreign join, or foreign upper-relation
processing"? I think we would probably need to update the comment in
src/backend/optimizer/README (L358), too.

That's a lot better. Updated patch attached.

Looks OK to me, too. Committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Amit Langote
amitlangote09@gmail.com
In reply to: Robert Haas (#4)
Re: Description of ForeignPath

On Fri, Apr 22, 2016 at 2:32 AM, Robert Haas <robertmhaas@gmail.com> wrote:

On Wed, Apr 20, 2016 at 3:37 AM, Amit Langote wrote:

I think it'd be better to match the comment with that for
create_foreignscan_path(). So how about "ForeignPath represents a
potential scan of a foreign table, foreign join, or foreign upper-relation
processing"? I think we would probably need to update the comment in
src/backend/optimizer/README (L358), too.

That's a lot better. Updated patch attached.

Looks OK to me, too. Committed.

Thanks!

- Amit

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers