On Mon, Oct 24, 2016 at 7:56 AM, Tatsuro Yamada <yamada.tats...@lab.ntt.co.jp> wrote: > 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 (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers