mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Phase 2 of read-only-plans project: restructure expression-tree nodes
so that all executable expression nodes inherit from a common supertype Expr. This is somewhat of an exercise in code purity rather than any real functional advance, but getting rid of the extra Oper or Func node formerly used in each operator or function call should provide at least a little space and speed improvement. initdb forced by changes in stored-rules representation.
This commit is contained in:
@ -45,7 +45,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.98 2002/12/05 15:50:32 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.99 2002/12/12 15:49:24 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -415,7 +415,7 @@ advance_aggregates(AggState *aggstate, AggStatePerGroup pergroup)
|
||||
Datum newVal;
|
||||
bool isNull;
|
||||
|
||||
newVal = ExecEvalExprSwitchContext(aggref->target, econtext,
|
||||
newVal = ExecEvalExprSwitchContext((Node *) aggref->target, econtext,
|
||||
&isNull, NULL);
|
||||
|
||||
if (aggref->aggdistinct)
|
||||
@ -1298,7 +1298,7 @@ ExecInitAgg(Agg *node, EState *estate)
|
||||
* pg_proc.proargtypes, because the latter might be 0.
|
||||
* (Consider COUNT(*).)
|
||||
*/
|
||||
Oid inputType = exprType(aggref->target);
|
||||
Oid inputType = exprType((Node *) aggref->target);
|
||||
|
||||
if (!IsBinaryCoercible(inputType, aggform->aggtranstype))
|
||||
elog(ERROR, "Aggregate %u needs to have compatible input type and transition type",
|
||||
@ -1312,7 +1312,7 @@ ExecInitAgg(Agg *node, EState *estate)
|
||||
* pg_proc.proargtypes, because the latter might be a pseudotype.
|
||||
* (Consider COUNT(*).)
|
||||
*/
|
||||
Oid inputType = exprType(aggref->target);
|
||||
Oid inputType = exprType((Node *) aggref->target);
|
||||
Oid eq_function;
|
||||
|
||||
/* We don't implement DISTINCT aggs in the HASHED case */
|
||||
|
Reference in New Issue
Block a user