Commit 17467bb7 authored by Bruce Momjian's avatar Bruce Momjian

Rename Aggreg to Aggref.

parent 157349e3
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.39 1998/12/04 15:33:19 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.40 1999/01/24 00:28:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -67,7 +67,7 @@ bool execConstByVal;
int execConstLen;
/* static functions decls */
static Datum ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull);
static Datum ExecEvalAggref(Aggref *agg, ExprContext *econtext, bool *isNull);
static Datum ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext *econtext,
bool *isNull, bool *isDone);
static Datum ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull);
......@@ -185,14 +185,14 @@ ExecEvalArrayRef(ArrayRef *arrayRef,
/* ----------------------------------------------------------------
* ExecEvalAggreg
* ExecEvalAggref
*
* Returns a Datum whose value is the value of the precomputed
* aggregate found in the given expression context.
* ----------------------------------------------------------------
*/
static Datum
ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull)
ExecEvalAggref(Aggref *agg, ExprContext *econtext, bool *isNull)
{
*isNull = econtext->ecxt_nulls[agg->aggno];
return econtext->ecxt_values[agg->aggno];
......@@ -1268,8 +1268,8 @@ ExecEvalExpr(Node *expression,
isNull,
isDone);
break;
case T_Aggreg:
retDatum = (Datum) ExecEvalAggreg((Aggreg *) expression,
case T_Aggref:
retDatum = (Datum) ExecEvalAggref((Aggref *) expression,
econtext,
isNull);
break;
......
......@@ -45,7 +45,7 @@ typedef struct AggFuncInfo
FmgrInfo finalfn;
} AggFuncInfo;
static Datum aggGetAttr(TupleTableSlot *tuple, Aggreg *agg, bool *isNull);
static Datum aggGetAttr(TupleTableSlot *tuple, Aggref *agg, bool *isNull);
/* ---------------------------------------
......@@ -90,7 +90,7 @@ ExecAgg(Agg *node)
{
AggState *aggstate;
EState *estate;
Aggreg **aggregates;
Aggref **aggregates;
Plan *outerPlan;
int i,
nagg;
......@@ -133,7 +133,7 @@ ExecAgg(Agg *node)
nagg = length(node->aggs);
aggregates = (Aggreg **) palloc(sizeof(Aggreg *) * nagg);
aggregates = (Aggref **) palloc(sizeof(Aggref *) * nagg);
/* take List* and make it an array that can be quickly indexed */
alist = node->aggs;
......@@ -163,7 +163,7 @@ ExecAgg(Agg *node)
for (i = 0; i < nagg; i++)
{
Aggreg *agg;
Aggref *agg;
char *aggname;
HeapTuple aggTuple;
Form_pg_aggregate aggp;
......@@ -628,7 +628,7 @@ ExecEndAgg(Agg *node)
*/
static Datum
aggGetAttr(TupleTableSlot *slot,
Aggreg *agg,
Aggref *agg,
bool *isNull)
{
Datum result;
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.53 1999/01/21 22:55:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.54 1999/01/24 00:28:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -899,13 +899,13 @@ _copyFunc(Func *from)
}
/* ----------------
* _copyAggreg
* _copyAggref
* ----------------
*/
static Aggreg *
_copyAggreg(Aggreg *from)
static Aggref *
_copyAggref(Aggref *from)
{
Aggreg *newnode = makeNode(Aggreg);
Aggref *newnode = makeNode(Aggref);
/* ----------------
* copy remainder of node
......@@ -1782,8 +1782,8 @@ copyObject(void *from)
case T_ArrayRef:
retval = _copyArrayRef(from);
break;
case T_Aggreg:
retval = _copyAggreg(from);
case T_Aggref:
retval = _copyAggref(from);
break;
case T_SubLink:
retval = _copySubLink(from);
......
......@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: outfuncs.c,v 1.60 1999/01/21 16:08:36 vadim Exp $
* $Id: outfuncs.c,v 1.61 1999/01/24 00:28:20 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
......@@ -686,10 +686,10 @@ _outConst(StringInfo str, Const *node)
}
/*
* Aggreg
* Aggref
*/
static void
_outAggreg(StringInfo str, Aggreg *node)
_outAggref(StringInfo str, Aggref *node)
{
appendStringInfo(str,
" AGGREG :aggname %s :basetype %u :aggtype %u :target ",
......@@ -1506,8 +1506,8 @@ _outNode(StringInfo str, void *obj)
case T_Const:
_outConst(str, obj);
break;
case T_Aggreg:
_outAggreg(str, obj);
case T_Aggref:
_outAggref(str, obj);
break;
case T_SubLink:
_outSubLink(str, obj);
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.42 1999/01/21 16:08:37 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.43 1999/01/24 00:28:20 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
......@@ -1161,19 +1161,19 @@ _readParam()
}
/* ----------------
* _readAggreg
* _readAggref
*
* Aggreg is a subclass of Node
* Aggref is a subclass of Node
* ----------------
*/
static Aggreg *
_readAggreg()
static Aggref *
_readAggref()
{
Aggreg *local_node;
Aggref *local_node;
char *token;
int length;
local_node = makeNode(Aggreg);
local_node = makeNode(Aggref);
token = lsptok(NULL, &length); /* eat :aggname */
token = lsptok(NULL, &length); /* get aggname */
......@@ -2040,7 +2040,7 @@ parsePlanString(void)
else if (!strncmp(token, "SORT", length))
return_value = _readSort();
else if (!strncmp(token, "AGGREG", length))
return_value = _readAggreg();
return_value = _readAggref();
else if (!strncmp(token, "SUBLINK", length))
return_value = _readSubLink();
else if (!strncmp(token, "AGG", length))
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.31 1999/01/23 23:28:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.32 1999/01/24 00:28:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -611,8 +611,8 @@ replace_result_clause(Node *clause,
((Var *) clause)->varno = (Index) OUTER;
((Var *) clause)->varattno = subplanVar->resdom->resno;
}
else if (IsA(clause, Aggreg))
replace_result_clause(((Aggreg *) clause)->target, subplanTargetList);
else if (IsA(clause, Aggref))
replace_result_clause(((Aggref *) clause)->target, subplanTargetList);
else if (is_funcclause(clause))
{
List *subExpr;
......@@ -704,7 +704,7 @@ OperandIsInner(Node *opnd, int inner_relid)
* changes the target list of an Agg node so that it points to
* the tuples returned by its left tree subplan.
*
* We now also generate a linked list of Aggreg pointers for Agg.
* We now also generate a linked list of Aggref pointers for Agg.
*
*/
List *
......@@ -765,10 +765,10 @@ replace_agg_clause(Node *clause, List *subplanTargetList)
}
return agg_list;
}
else if (IsA(clause, Aggreg))
else if (IsA(clause, Aggref))
{
return lcons(clause,
replace_agg_clause(((Aggreg *) clause)->target, subplanTargetList));
replace_agg_clause(((Aggref *) clause)->target, subplanTargetList));
}
else if (IsA(clause, ArrayRef))
{
......@@ -866,11 +866,11 @@ del_agg_clause(Node *clause)
foreach(t, ((Expr *) clause)->args)
lfirst(t) = del_agg_clause(lfirst(t));
}
else if (IsA(clause, Aggreg))
else if (IsA(clause, Aggref))
{
/* here is the real action, to remove the Agg node */
return del_agg_clause(((Aggreg *) clause)->target);
return del_agg_clause(((Aggref *) clause)->target);
}
else if (IsA(clause, ArrayRef))
......@@ -967,10 +967,10 @@ check_having_qual_for_vars(Node *clause, List *targetlist_so_far)
}
return targetlist_so_far;
}
else if (IsA(clause, Aggreg))
else if (IsA(clause, Aggref))
{
targetlist_so_far =
check_having_qual_for_vars(((Aggreg *) clause)->target, targetlist_so_far);
check_having_qual_for_vars(((Aggref *) clause)->target, targetlist_so_far);
return targetlist_so_far;
}
else if (IsA(clause, ArrayRef))
......@@ -1100,10 +1100,10 @@ check_having_qual_for_aggs(Node *clause, List *subplanTargetList, List *groupCla
}
return agg_list;
}
else if (IsA(clause, Aggreg))
else if (IsA(clause, Aggref))
{
return lcons(clause,
check_having_qual_for_aggs(((Aggreg *) clause)->target, subplanTargetList,
check_having_qual_for_aggs(((Aggref *) clause)->target, subplanTargetList,
groupClause));
}
else if (IsA(clause, ArrayRef))
......
......@@ -282,8 +282,8 @@ _finalize_primnode(void *expr, List **subplan)
else if (or_clause(expr) || and_clause(expr) || is_opclause(expr) ||
not_clause(expr) || is_funcclause(expr))
return _finalize_primnode(((Expr *) expr)->args, subplan);
else if (IsA(expr, Aggreg))
return _finalize_primnode(((Aggreg *) expr)->target, subplan);
else if (IsA(expr, Aggref))
return _finalize_primnode(((Aggref *) expr)->target, subplan);
else if (IsA(expr, ArrayRef))
{
result = _finalize_primnode(((ArrayRef *) expr)->refupperindexpr, subplan);
......@@ -349,9 +349,9 @@ SS_replace_correlation_vars(Node *expr)
not_clause(expr) || is_funcclause(expr))
((Expr *) expr)->args = (List *)
SS_replace_correlation_vars((Node *) ((Expr *) expr)->args);
else if (IsA(expr, Aggreg))
((Aggreg *) expr)->target =
SS_replace_correlation_vars((Node *) ((Aggreg *) expr)->target);
else if (IsA(expr, Aggref))
((Aggref *) expr)->target =
SS_replace_correlation_vars((Node *) ((Aggref *) expr)->target);
else if (IsA(expr, ArrayRef))
{
((ArrayRef *) expr)->refupperindexpr = (List *)
......@@ -530,8 +530,8 @@ SS_pull_subplan(void *expr)
else if (or_clause(expr) || and_clause(expr) || is_opclause(expr) ||
not_clause(expr) || is_funcclause(expr))
return SS_pull_subplan(((Expr *) expr)->args);
else if (IsA(expr, Aggreg))
return SS_pull_subplan(((Aggreg *) expr)->target);
else if (IsA(expr, Aggref))
return SS_pull_subplan(((Aggref *) expr)->target);
else if (IsA(expr, ArrayRef))
{
result = SS_pull_subplan(((ArrayRef *) expr)->refupperindexpr);
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.26 1998/12/04 15:34:14 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.27 1999/01/24 00:28:21 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
......@@ -145,7 +145,7 @@ static bool
agg_clause(Node *clause)
{
return
(clause != NULL && nodeTag(clause) == T_Aggreg);
(clause != NULL && nodeTag(clause) == T_Aggref);
}
/*****************************************************************************
......@@ -548,7 +548,7 @@ fix_opid(Node *clause)
fix_opid((Node *) get_rightop((Expr *) clause));
}
else if (agg_clause(clause))
fix_opid(((Aggreg *) clause)->target);
fix_opid(((Aggref *) clause)->target);
else if (is_subplan(clause) &&
((SubPlan *) ((Expr *) clause)->oper)->sublink->subLinkType != EXISTS_SUBLINK)
{
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.21 1998/12/04 15:34:15 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.22 1999/01/24 00:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -483,7 +483,7 @@ flatten_tlistentry(Node *tlistentry, List *flat_tlist)
return ((Node *) make_funcclause((Func *) expr->oper, temp_result));
}
else if (IsA(tlistentry, Aggreg))
else if (IsA(tlistentry, Aggref))
{
return tlistentry;
}
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.14 1998/12/04 15:34:15 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.15 1999/01/24 00:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -194,8 +194,8 @@ pull_var_clause(Node *clause)
retval = nconc(retval,
pull_var_clause(lfirst(((Expr *) lfirst(temp))->args)));
}
else if (IsA(clause, Aggreg))
retval = pull_var_clause(((Aggreg *) clause)->target);
else if (IsA(clause, Aggref))
retval = pull_var_clause(((Aggref *) clause)->target);
else if (IsA(clause, ArrayRef))
{
List *temp;
......
......@@ -239,7 +239,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.61 1999/01/22 19:35:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.62 1999/01/24 00:28:23 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.15 1998/12/08 06:18:56 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.16 1999/01/24 00:28:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -37,7 +37,7 @@ static bool tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause);
/*
* contain_agg_clause--
* Recursively find aggreg nodes from a clause.
* Recursively find aggref nodes from a clause.
*
* Returns true if any aggregate found.
*/
......@@ -46,7 +46,7 @@ contain_agg_clause(Node *clause)
{
if (clause == NULL)
return FALSE;
else if (IsA(clause, Aggreg))
else if (IsA(clause, Aggref))
return TRUE;
else if (IsA(clause, Iter))
return contain_agg_clause(((Iter *) clause)->iterexpr);
......@@ -105,7 +105,7 @@ exprIsAggOrGroupCol(Node *expr, List *groupClause)
List *gl;
if (expr == NULL || IsA(expr, Const) ||
IsA(expr, Param) || IsA(expr, Aggreg) ||
IsA(expr, Param) || IsA(expr, Aggref) ||
IsA(expr, SubLink)) /* can't handle currently !!! */
return TRUE;
......@@ -155,7 +155,7 @@ tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause)
}
}
if (IsA(expr, Aggreg))
if (IsA(expr, Aggref))
return TRUE;
if (IsA(expr, Expr))
......@@ -217,7 +217,7 @@ parseCheckAggregates(ParseState *pstate, Query *qry)
}
Aggreg *
Aggref *
ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
List *target, int precedence)
{
......@@ -225,7 +225,7 @@ ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
Oid vartype;
Oid xfn1;
Form_pg_aggregate aggform;
Aggreg *aggreg;
Aggref *aggref;
HeapTuple theAggTuple;
bool usenulls = false;
......@@ -324,18 +324,18 @@ ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
}
}
aggreg = makeNode(Aggreg);
aggreg->aggname = pstrdup(aggname);
aggreg->basetype = aggform->aggbasetype;
aggreg->aggtype = fintype;
aggref = makeNode(Aggref);
aggref->aggname = pstrdup(aggname);
aggref->basetype = aggform->aggbasetype;
aggref->aggtype = fintype;
aggreg->target = lfirst(target);
aggref->target = lfirst(target);
if (usenulls)
aggreg->usenulls = true;
aggref->usenulls = true;
pstate->p_hasAggs = true;
return aggreg;
return aggref;
}
/*
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.38 1998/12/13 23:56:43 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.39 1999/01/24 00:28:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -586,8 +586,8 @@ exprType(Node *expr)
case T_ArrayRef:
type = ((ArrayRef *) expr)->refelemtype;
break;
case T_Aggreg:
type = ((Aggreg *) expr)->aggtype;
case T_Aggref:
type = ((Aggref *) expr)->aggtype;
break;
case T_Param:
type = ((Param *) expr)->paramtype;
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.32 1998/12/13 23:56:44 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.33 1999/01/24 00:28:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -872,8 +872,8 @@ FigureColname(Node *expr, Node *resval)
{
switch (nodeTag(expr))
{
case T_Aggreg:
return (char *) ((Aggreg *) expr)->aggname;
case T_Aggref:
return (char *) ((Aggref *) expr)->aggname;
case T_Expr:
if (((Expr *) expr)->opType == FUNC_EXPR)
{
......
......@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.14 1998/10/02 16:27:45 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.15 1999/01/24 00:28:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -66,9 +66,9 @@ nodeThisLockWasTriggered(Node *node, int varno, AttrNumber attnum,
sublevels_up);
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *) node;
Aggref *agg = (Aggref *) node;
return nodeThisLockWasTriggered(agg->target, varno, attnum,
sublevels_up);
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.24 1999/01/18 00:09:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.25 1999/01/24 00:28:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -53,9 +53,9 @@ OffsetVarNodes(Node *node, int offset, int sublevels_up)
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *)node;
Aggref *agg = (Aggref *)node;
OffsetVarNodes(
(Node *)(agg->target),
......@@ -271,9 +271,9 @@ ChangeVarNodes(Node *node, int rt_index, int new_index, int sublevels_up)
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *)node;
Aggref *agg = (Aggref *)node;
ChangeVarNodes(
(Node *)(agg->target),
......@@ -641,8 +641,8 @@ ResolveNew(RewriteInfo *info, List *targetlist, Node **nodePtr,
ResolveNew(info, targetlist, &((TargetEntry *) node)->expr,
sublevels_up);
break;
case T_Aggreg:
ResolveNew(info, targetlist, &((Aggreg *) node)->target,
case T_Aggref:
ResolveNew(info, targetlist, &((Aggref *) node)->target,
sublevels_up);
break;
case T_Expr:
......@@ -746,9 +746,9 @@ nodeHandleRIRAttributeRule(Node **nodePtr,
sublevels_up);
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *) node;
Aggref *agg = (Aggref *) node;
nodeHandleRIRAttributeRule(&agg->target, rtable, targetlist,
rt_index, attr_num, modified, badsql,
......@@ -911,9 +911,9 @@ nodeHandleViewRule(Node **nodePtr,
rt_index, modified, sublevels_up);
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *) node;
Aggref *agg = (Aggref *) node;
nodeHandleViewRule(&(agg->target), rtable, targetlist,
rt_index, modified, sublevels_up);
......
......@@ -3,7 +3,7 @@
* out of it's tuple
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.6 1998/10/26 01:01:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.7 1999/01/24 00:28:32 momjian Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
......@@ -1245,9 +1245,9 @@ get_rule_expr(QryHier *qh, int rt_index, Node *node, bool varprefix)
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *) node;
Aggref *agg = (Aggref *) node;
strcat(buf, "\"");
strcat(buf, agg->aggname);
......@@ -1727,9 +1727,9 @@ check_if_rte_used(int rt_index, Node *node, int sup)
}
break;
case T_Aggreg:
case T_Aggref:
{
Aggreg *agg = (Aggreg *) node;
Aggref *agg = (Aggref *) node;
return check_if_rte_used(rt_index,
(Node *) (agg->target), sup);
......
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodes.h,v 1.34 1999/01/21 16:08:53 vadim Exp $
* $Id: nodes.h,v 1.35 1999/01/24 00:28:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -60,7 +60,7 @@ typedef enum NodeTag
T_Oper,
T_Const,
T_Param,
T_Aggreg,
T_Aggref,
T_SubLink,
T_Func,
T_Array,
......
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: primnodes.h,v 1.23 1998/09/01 04:36:47 momjian Exp $
* $Id: primnodes.h,v 1.24 1999/01/24 00:28:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -255,7 +255,7 @@ typedef struct Func
} Func;
/* ----------------
* Aggreg
* Aggref
* aggname - name of the aggregate
* basetype - base type Oid of the aggregate
* aggtype - type Oid of final result of the aggregate
......@@ -263,7 +263,7 @@ typedef struct Func
* aggno - index to ecxt_values
* ----------------
*/
typedef struct Aggreg
typedef struct Aggref
{
NodeTag type;
char *aggname;
......@@ -272,7 +272,7 @@ typedef struct Aggreg
Node *target;
int aggno;
bool usenulls;
} Aggreg;
} Aggref;
/* ----------------
* SubLink
......
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: parse_agg.h,v 1.7 1998/09/01 04:37:29 momjian Exp $
* $Id: parse_agg.h,v 1.8 1999/01/24 00:28:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -18,9 +18,9 @@
#include <nodes/primnodes.h>
#include <parser/parse_node.h>
extern void AddAggToParseState(ParseState *pstate, Aggreg *aggreg);
extern void AddAggToParseState(ParseState *pstate, Aggref *aggref);
extern void parseCheckAggregates(ParseState *pstate, Query *qry);
extern Aggreg *ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
extern Aggref *ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
List *target, int precedence);
extern void agg_error(char *caller, char *aggname, Oid basetypeID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment