Skip to content

Commit

Permalink
Issue #49, Part 2: Version 1.0.6 does not compile for PostgreSQL 9.5 rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffMontee committed Jan 6, 2016
1 parent 0809800 commit cd84f7b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/tds_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1895,10 +1895,16 @@ void tdsGetForeignPaths(PlannerInfo *root, RelOptInfo *baserel, Oid foreigntable
#endif

tdsEstimateCosts(root, baserel, &startup_cost, &total_cost, foreigntableid);


#if (PG_VERSION_NUM >= 90500)
add_path(baserel,
(Path *) create_foreignscan_path(root, baserel, baserel->rows, startup_cost, total_cost,
NIL, NULL, NULL, NIL));
#else
add_path(baserel,
(Path *) create_foreignscan_path(root, baserel, baserel->rows, startup_cost, total_cost,
NIL, NULL, NIL));
#endif

#ifdef DEBUG
ereport(NOTICE,
Expand All @@ -1923,9 +1929,13 @@ bool tdsAnalyzeForeignTable(Relation relation, AcquireSampleRowsFunc *func, Bloc

return false;
}

#if (PG_VERSION_NUM >= 90500)
ForeignScan* tdsGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel,
Oid foreigntableid, ForeignPath *best_path, List *tlist, List *scan_clauses, Plan *outer_plan)
#else
ForeignScan* tdsGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel,
Oid foreigntableid, ForeignPath *best_path, List *tlist, List *scan_clauses)
#endif
{
Index scan_relid = baserel->relid;
#ifdef DEBUG
Expand Down

0 comments on commit cd84f7b

Please sign in to comment.