Hi,
during the initialization of the nodes in the plan tree (in ExecInitNode in
the file execProcnode.c) I want to find out for a node with the type T_Agg
which table will be aggregated. I tried the following:
resultAsAggState = ExecInitAgg((Agg *) node, estate, eflags);
if (resultAsAggState)
{
2014/1/15 Masterprojekt Naumann1 mpws201...@gmail.com
Hi,
during the initialization of the nodes in the plan tree (in ExecInitNode
in the file execProcnode.c) I want to find out for a node with the type
T_Agg which table will be aggregated. I tried the following:
resultAsAggState =
Hi Cathleen,
An aggregate can be working on more than one table e.g.
select count(*) from a, b, c where a.c1 = b.c1 and b.c1 = c.c1;
In such a case, which table would you like to be reported?
IOW, it doesn't look to be sensible to attach and aggregate with a table.
If you can explain what you
2014/1/15 Ashutosh Bapat ashutosh.ba...@enterprisedb.com
Hi Cathleen,
An aggregate can be working on more than one table e.g.
select count(*) from a, b, c where a.c1 = b.c1 and b.c1 = c.c1;
In such a case, which table would you like to be reported?
IOW, it doesn't look to be sensible to
Hmm, ok, this is slighly involved.
Is it important that you should do this at the execution time? At planner
level where Agg node is involved, one can look for Aggref node and traverse
down the args list to find any vars are involved in aggregation. You can
find Var nodes involved in an Aggref by