I'm trying to implement estimated_count() function that's mentioned in
the TODO list. First of all, I wanted to learn if this TODO item is
still valid? I looked at the related -hackers discussions, does anybody
want to say more sth related with the implementation?

Also I've some questions. I'd be appreciated if somebody would answer
any of the below questions to help me find my way.

1. I'm planning to use same method as ExplainOneQuery() does in
   backend/commands/explain.c. (Using Plan->plan_rows that will be
   returned from planner(query, isCursor, cursorOptions, params)
   function.) Is this the way to go, or should I look for another
   method to aggregate estimated row count.

2. I've been also considering getting called from a nodeAgg. In such a
   case, it shouldn't be a problem for me to use same way as above to
   retrieve Query, ParamListInfo and TupOutputState. Right?

3. I was looking at int8inc() and backend/executor/nodeAgg.c and
   couldn't find anything special to count() aggregate. Am I looking
   at the right place? For instance, for my case, I won't need any
   transition function call. How should I modify nodeAgg.c to skip
   transfn calls for estimated_count()?

4. Related with the problem, any question I missed.


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to