Comment update to pathnode.c

Started by Etsuro Fujitaover 10 years ago5 messages
#1Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
1 attachment(s)

Hi,

The comments for create_foreignscan_path says as follows, but that it's
now possible that the function is called by GetForeignJoinPaths, which
was added in 9.5.

1450 /*
1451 * create_foreignscan_path
1452 * Creates a path corresponding to a scan of a foreign table,
1453 * returning the pathnode.
1454 *
1455 * This function is never called from core Postgres; rather, it's
expected
1456 * to be called by the GetForeignPaths function of a foreign data
wrapper.
1457 * We make the FDW supply all fields of the path, since we do not
have any
1458 * way to calculate them in core.
1459 */

So, I've updated the comments. Please find attached a patch.

Best regards,
Etsuro Fujita

Attachments:

create-foreignscan-path-comments.patchtext/x-patch; name=create-foreignscan-path-comments.patchDownload
*** a/src/backend/optimizer/util/pathnode.c
--- b/src/backend/optimizer/util/pathnode.c
***************
*** 1449,1459 **** create_worktablescan_path(PlannerInfo *root, RelOptInfo *rel,
  
  /*
   * create_foreignscan_path
!  *	  Creates a path corresponding to a scan of a foreign table,
!  *	  returning the pathnode.
   *
   * This function is never called from core Postgres; rather, it's expected
!  * to be called by the GetForeignPaths function of a foreign data wrapper.
   * We make the FDW supply all fields of the path, since we do not have any
   * way to calculate them in core.
   */
--- 1449,1460 ----
  
  /*
   * create_foreignscan_path
!  *	  Creates a path corresponding to a scan of a foreign table or
!  *	  a foreign join, returning the pathnode.
   *
   * This function is never called from core Postgres; rather, it's expected
!  * to be called by the GetForeignPaths function or the GetForeignJoinPaths
!  * function of a foreign data wrapper.
   * We make the FDW supply all fields of the path, since we do not have any
   * way to calculate them in core.
   */
#2Robert Haas
robertmhaas@gmail.com
In reply to: Etsuro Fujita (#1)
Re: Comment update to pathnode.c

On Fri, Sep 11, 2015 at 6:22 AM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:

The comments for create_foreignscan_path says as follows, but that it's
now possible that the function is called by GetForeignJoinPaths, which
was added in 9.5.

1450 /*
1451 * create_foreignscan_path
1452 * Creates a path corresponding to a scan of a foreign table,
1453 * returning the pathnode.
1454 *
1455 * This function is never called from core Postgres; rather, it's
expected
1456 * to be called by the GetForeignPaths function of a foreign data
wrapper.
1457 * We make the FDW supply all fields of the path, since we do not
have any
1458 * way to calculate them in core.
1459 */

So, I've updated the comments. Please find attached a patch.

I would write "to be called by the GetForeignPaths or
GetForeignJoinPaths function" to keep it a bit more concise. And I
would reflow the paragraph.

--
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

#3Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Robert Haas (#2)
1 attachment(s)
Re: Comment update to pathnode.c

On 2015/09/12 4:26, Robert Haas wrote:

On Fri, Sep 11, 2015 at 6:22 AM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:

The comments for create_foreignscan_path says as follows, but that it's
now possible that the function is called by GetForeignJoinPaths, which
was added in 9.5.

1450 /*
1451 * create_foreignscan_path
1452 * Creates a path corresponding to a scan of a foreign table,
1453 * returning the pathnode.
1454 *
1455 * This function is never called from core Postgres; rather, it's
expected
1456 * to be called by the GetForeignPaths function of a foreign data
wrapper.
1457 * We make the FDW supply all fields of the path, since we do not
have any
1458 * way to calculate them in core.
1459 */

So, I've updated the comments. Please find attached a patch.

I would write "to be called by the GetForeignPaths or
GetForeignJoinPaths function" to keep it a bit more concise. And I
would reflow the paragraph.

Thanks for the comments! Attached is an updated version of the patch.

Best regards,
Etsuro Fujita

Attachments:

create-foreignscan-path-comments-v2.patchtext/x-patch; name=create-foreignscan-path-comments-v2.patchDownload
*** a/src/backend/optimizer/util/pathnode.c
--- b/src/backend/optimizer/util/pathnode.c
***************
*** 1449,1461 **** create_worktablescan_path(PlannerInfo *root, RelOptInfo *rel,
  
  /*
   * create_foreignscan_path
!  *	  Creates a path corresponding to a scan of a foreign table,
!  *	  returning the pathnode.
   *
   * This function is never called from core Postgres; rather, it's expected
!  * to be called by the GetForeignPaths function of a foreign data wrapper.
!  * We make the FDW supply all fields of the path, since we do not have any
!  * way to calculate them in core.
   */
  ForeignPath *
  create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
--- 1449,1461 ----
  
  /*
   * create_foreignscan_path
!  *	  Creates a path corresponding to a scan of a foreign table or
!  *	  a foreign join, returning the pathnode.
   *
   * This function is never called from core Postgres; rather, it's expected
!  * to be called by the GetForeignPaths or GetForeignJoinPaths function of
!  * a foreign data wrapper.  We make the FDW supply all fields of the path,
!  * since we do not have any way to calculate them in core.
   */
  ForeignPath *
  create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
#4Robert Haas
robertmhaas@gmail.com
In reply to: Etsuro Fujita (#3)
Re: Comment update to pathnode.c

On Tue, Sep 29, 2015 at 1:55 AM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:

Thanks for the comments! Attached is an updated version of the patch.

Committed and back-patched to 9.5.

--
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

#5Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Robert Haas (#4)
Re: Comment update to pathnode.c

On 2015/09/29 20:51, Robert Haas wrote:

On Tue, Sep 29, 2015 at 1:55 AM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:

Thanks for the comments! Attached is an updated version of the patch.

Committed and back-patched to 9.5.

Thanks!

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