diff options
| author | Tom Lane | 2016-06-26 19:55:01 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-06-26 19:55:01 +0000 |
| commit | f1993038a4f0ce5fbeb7b562b2acd571bf6b567b (patch) | |
| tree | 93f5ee92beb05cab27515290246a72a1b6648845 /src/include/optimizer | |
| parent | 19e972d5580c655423572e3c870e47b5b7c346f6 (diff) | |
Avoid making a separate pass over the query to check for partializability.
It's rather silly to make a separate pass over the tlist + HAVING qual,
and a separate set of visits to the syscache, when get_agg_clause_costs
already has all the required information in hand. This nets out as less
code as well as fewer cycles.
Diffstat (limited to 'src/include/optimizer')
| -rw-r--r-- | src/include/optimizer/clauses.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h index 526126df6fc..be7c639f7b9 100644 --- a/src/include/optimizer/clauses.h +++ b/src/include/optimizer/clauses.h @@ -27,25 +27,6 @@ typedef struct List **windowFuncs; /* lists of WindowFuncs for each winref */ } WindowFuncLists; -/* - * PartialAggType - * PartialAggType stores whether partial aggregation is allowed and - * which context it is allowed in. We require three states here as there are - * two different contexts in which partial aggregation is safe. For aggregates - * which have an 'stype' of INTERNAL, it is okay to pass a pointer to the - * aggregate state within a single process, since the datum is just a - * pointer. In cases where the aggregate state must be passed between - * different processes, for example during parallel aggregation, passing - * pointers directly is not going to work. - */ -typedef enum -{ - PAT_ANY = 0, /* Any type of partial aggregation is okay. */ - PAT_INTERNAL_ONLY, /* Some aggregates support only internal mode. */ - PAT_DISABLED /* Some aggregates don't support partial mode - * at all */ -} PartialAggType; - extern Expr *make_opclause(Oid opno, Oid opresulttype, bool opretset, Expr *leftop, Expr *rightop, Oid opcollid, Oid inputcollid); @@ -65,7 +46,6 @@ extern Node *make_and_qual(Node *qual1, Node *qual2); extern Expr *make_ands_explicit(List *andclauses); extern List *make_ands_implicit(Expr *clause); -extern PartialAggType aggregates_allow_partial(Node *clause); extern bool contain_agg_clause(Node *clause); extern void get_agg_clause_costs(PlannerInfo *root, Node *clause, AggSplit aggsplit, AggClauseCosts *costs); |
