|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "catalog/pg_aggregate.h"#include "catalog/pg_type.h"#include "nodes/nodeFuncs.h"#include "nodes/pathnodes.h"#include "optimizer/cost.h"#include "optimizer/optimizer.h"#include "optimizer/plancat.h"#include "optimizer/prep.h"#include "parser/parse_agg.h"#include "utils/builtins.h"#include "utils/datum.h"#include "utils/fmgroids.h"#include "utils/lsyscache.h"#include "utils/memutils.h"#include "utils/syscache.h"
Go to the source code of this file.
Functions | |
| static bool | preprocess_aggrefs_walker (Node *node, PlannerInfo *root) |
| static int | find_compatible_agg (PlannerInfo *root, Aggref *newagg, List **same_input_transnos) |
| static int | find_compatible_trans (PlannerInfo *root, Aggref *newagg, bool shareable, Oid aggtransfn, Oid aggtranstype, int transtypeLen, bool transtypeByVal, Oid aggcombinefn, Oid aggserialfn, Oid aggdeserialfn, Datum initValue, bool initValueIsNull, List *transnos) |
| static Datum | GetAggInitVal (Datum textInitVal, Oid transtype) |
| void | preprocess_aggrefs (PlannerInfo *root, Node *clause) |
| static void | preprocess_aggref (Aggref *aggref, PlannerInfo *root) |
| void | get_agg_clause_costs (PlannerInfo *root, AggSplit aggsplit, AggClauseCosts *costs) |
|
static |
Definition at line 379 of file prepagg.c.
References contain_volatile_functions(), equal(), fb(), lappend_int(), lfirst_node, linitial_node, list_free(), NIL, and root.
Referenced by preprocess_aggref().
|
static |
Definition at line 457 of file prepagg.c.
References AggTransInfo::aggtranstype, AggTransInfo::combinefn_oid, datumIsEqual(), AggTransInfo::deserialfn_oid, fb(), initValue(), AggTransInfo::initValueIsNull, lfirst_int, list_nth_node, root, AggTransInfo::serialfn_oid, and AggTransInfo::transfn_oid.
Referenced by preprocess_aggref().
| void get_agg_clause_costs | ( | PlannerInfo * | root, |
| AggSplit | aggsplit, | ||
| AggClauseCosts * | costs | ||
| ) |
Definition at line 559 of file prepagg.c.
References add_function_cost(), Aggref::aggdirectargs, ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_SMALL_INITSIZE, cost_qual_eval_node(), DO_AGGSPLIT_COMBINE, DO_AGGSPLIT_DESERIALIZE, DO_AGGSPLIT_SERIALIZE, DO_AGGSPLIT_SKIPFINAL, fb(), AggClauseCosts::finalCost, get_typavgwidth(), lfirst_node, linitial_node, MAXALIGN, OidIsValid, QualCost::per_tuple, root, QualCost::startup, AggClauseCosts::transCost, and AggClauseCosts::transitionSpace.
Referenced by create_grouping_paths(), create_partial_grouping_paths(), estimate_path_cost_size(), and generate_grouped_paths().
Definition at line 521 of file prepagg.c.
References fb(), getTypeInputInfo(), OidInputFunctionCall(), pfree(), and TextDatumGetCString.
Referenced by preprocess_aggref().
|
static |
Definition at line 116 of file prepagg.c.
References agg_args_support_sendreceive(), Aggref::aggdistinct, Aggref::aggfilter, Aggref::aggfnoid, Aggref::aggorder, Aggref::args, Assert, elog, ERROR, exprType(), exprTypmod(), fb(), find_compatible_agg(), find_compatible_trans(), FUNC_MAX_ARGS, get_aggregate_argtypes(), get_typlenbyval(), GetAggInitVal(), GETSTRUCT(), HeapTupleIsValid, initValue(), lappend(), linitial, list_length(), list_make1, list_nth_node, makeNode, NIL, ObjectIdGetDatum(), OidIsValid, ReleaseSysCache(), resolve_aggregate_transtype(), root, SearchSysCache1(), and SysCacheGetAttr().
Referenced by preprocess_aggrefs_walker().
| void preprocess_aggrefs | ( | PlannerInfo * | root, |
| Node * | clause | ||
| ) |
Definition at line 110 of file prepagg.c.
References fb(), preprocess_aggrefs_walker(), and root.
Referenced by grouping_planner().
|
static |
Definition at line 344 of file prepagg.c.
References Assert, expression_tree_walker, fb(), IsA, preprocess_aggref(), preprocess_aggrefs_walker(), and root.
Referenced by preprocess_aggrefs(), and preprocess_aggrefs_walker().