diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-10-21 09:54:29 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-10-21 09:54:29 -0400 |
commit | 7012b132d07c2b4ea15b0b3cb1ea9f3278801d98 (patch) | |
tree | d0a15aedea339d5b74ec63768ff5b2db0abd0c2d /contrib/postgres_fdw/postgres_fdw.h | |
parent | 709e461befa8a4999c4ccdbfc7260ef8092e805c (diff) | |
download | postgresql-7012b132d07c2b4ea15b0b3cb1ea9f3278801d98.tar.gz postgresql-7012b132d07c2b4ea15b0b3cb1ea9f3278801d98.zip |
postgres_fdw: Push down aggregates to remote servers.
Now that the upper planner uses paths, and now that we have proper hooks
to inject paths into the upper planning process, it's possible for
foreign data wrappers to arrange to push aggregates to the remote side
instead of fetching all of the rows and aggregating them locally. This
figures to be a massive win for performance, so teach postgres_fdw to
do it.
Jeevan Chalke and Ashutosh Bapat. Reviewed by Ashutosh Bapat with
additional testing by Prabhat Sahu. Various mostly cosmetic changes
by me.
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.h')
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h index 67126bc421f..f8c255ef9ba 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -92,6 +92,9 @@ typedef struct PgFdwRelationInfo RelOptInfo *innerrel; JoinType jointype; List *joinclauses; + + /* Grouping information */ + List *grouped_tlist; } PgFdwRelationInfo; /* in postgres_fdw.c */ @@ -155,7 +158,7 @@ extern void deparseAnalyzeSql(StringInfo buf, Relation rel, List **retrieved_attrs); extern void deparseStringLiteral(StringInfo buf, const char *val); extern Expr *find_em_expr_for_rel(EquivalenceClass *ec, RelOptInfo *rel); -extern List *build_tlist_to_deparse(RelOptInfo *foreign_rel); +extern List *build_tlist_to_deparse(RelOptInfo *foreignrel); extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, List *tlist, List *remote_conds, List *pathkeys, |