Re: [HACKERS] Minor code improvement to postgresGetForeignJoinPaths
On 2016/11/04 0:29, Robert Haas wrote: Committed. Thanks! Tatsuro Yamada NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Minor code improvement to postgresGetForeignJoinPaths
On Tue, Oct 25, 2016 at 1:59 AM, Tatsuro Yamadawrote: > Hi Ashutosh, >> You are right. Every call except that one is using NIL, so better to >> fix it. The pattern was repeated in the recent aggregate pushdown >> support. Here's patch to fix create_foreignscan_path() call in >> add_foreign_grouping_paths() as well. > > Thanks for the review! 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
Re: [HACKERS] Minor code improvement to postgresGetForeignJoinPaths
Hi Ashutosh, You are right. Every call except that one is using NIL, so better to fix it. The pattern was repeated in the recent aggregate pushdown support. Here's patch to fix create_foreignscan_path() call in add_foreign_grouping_paths() as well. Thanks for the review! Tatsuro Yamada NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Minor code improvement to postgresGetForeignJoinPaths
On Mon, Oct 24, 2016 at 7:56 AM, Tatsuro Yamadawrote: > Hi, > > The last argument of create_foreignscan_path called by > postgresGetForeignJoinPaths is > set to NULL, but it would be suitable to set it to NIL because the argument > type is List. > > Please find attached a patch. > You are right. Every call except that one is using NIL, so better to fix it. The pattern was repeated in the recent aggregate pushdown support. Here's patch to fix create_foreignscan_path() call in add_foreign_grouping_paths() as well. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 906d6e6..2cfb82b 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -4424,21 +4424,21 @@ postgresGetForeignJoinPaths(PlannerInfo *root, */ joinpath = create_foreignscan_path(root, joinrel, NULL, /* default pathtarget */ rows, startup_cost, total_cost, NIL, /* no pathkeys */ NULL, /* no required_outer */ epq_path, - NULL); /* no fdw_private */ + NIL); /* no fdw_private */ /* Add generated path into joinrel by add_path(). */ add_path(joinrel, (Path *) joinpath); /* Consider pathkeys for the join relation */ add_paths_with_pathkeys_for_rel(root, joinrel, epq_path); /* XXX Consider parameterized paths for the join relation */ } @@ -4741,21 +4741,21 @@ add_foreign_grouping_paths(PlannerInfo *root, RelOptInfo *input_rel, /* Create and add foreign path to the grouping relation. */ grouppath = create_foreignscan_path(root, grouped_rel, grouping_target, rows, startup_cost, total_cost, NIL, /* no pathkeys */ NULL, /* no required_outer */ NULL, - NULL); /* no fdw_private */ + NIL); /* no fdw_private */ /* Add generated path into grouped_rel by add_path(). */ add_path(grouped_rel, (Path *) grouppath); } /* * Create a tuple from the specified row of the PGresult. * * rel is the local representation of the foreign table, attinmeta is * conversion data for the rel's tupdesc, and retrieved_attrs is an -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Minor code improvement to postgresGetForeignJoinPaths
Hi, The last argument of create_foreignscan_path called by postgresGetForeignJoinPaths is set to NULL, but it would be suitable to set it to NIL because the argument type is List. Please find attached a patch. Tatsuro Yamada NTT Open Source Software Center diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index daf0438..a5de611 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -4331,7 +4331,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root, NIL, /* no pathkeys */ NULL, /* no required_outer */ epq_path, - NULL); /* no fdw_private */ + NIL); /* no fdw_private */ /* Add generated path into joinrel by add_path(). */ add_path(joinrel, (Path *) joinpath); -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers