Create an official API function for C functions to use to check if they are

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d5768dce10576c2fb1254c03fb29475d4fac6bb4
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-02-08T20:39:52Z
Releases: 9.0.0
Create an official API function for C functions to use to check if they are
being called as aggregates, and to get the aggregate transition state memory
context if needed.  Use it instead of poking directly into AggState and
WindowAggState in places that shouldn't know so much.

We should have done this in 8.4, probably, but better late than never.

Revised version of a patch by Hitoshi Harada.

Files