Re: [GENERAL] Question about using AggCheckCallContext in a C function

2013-08-13 Thread Matt Solnit
On Aug 12, 2013, at 12:47 PM, Tom Lane wrote: > Matt Solnit writes: >> 2. The function seems to work consistently when I do a SELECT >> SUM(mycol) without any GROUP BY. It's only when I add grouping that >> the failures happen. I'm not sure if this is a real clue or a red >> herring. > > That

Re: [GENERAL] Question about using AggCheckCallContext in a C function

2013-08-12 Thread Tom Lane
Matt Solnit writes: > 2. The function seems to work consistently when I do a SELECT > SUM(mycol) without any GROUP BY. It's only when I add grouping that > the failures happen. I'm not sure if this is a real clue or a red > herring. That isn't enormously surprising, since the memory management

Re: [GENERAL] Question about using AggCheckCallContext in a C function

2013-08-12 Thread Matt Solnit
On Aug 12, 2013, at 11:53 AM, Tom Lane wrote: > Matt Solnit writes: >> After poring over the code in nodeAgg.c, and looking at the in8inc() >> function, I think I know what the problem is: the typical use of >> AggCheckCallContext() is not compatible with TOAST-able data types. > > That's non

Re: [GENERAL] Question about using AggCheckCallContext in a C function

2013-08-12 Thread Tom Lane
Matt Solnit writes: > After poring over the code in nodeAgg.c, and looking at the in8inc() > function, I think I know what the problem is: the typical use of > AggCheckCallContext() is not compatible with TOAST-able data types. That's nonsense. There are several standard aggregates that use tha