Tom Lane wrote:
So I'm rather inclined to define this behavior as "not a bug". The fact that you're complaining seems to indicate that your ffunc scribbles on its input, which is bad programming practice in any case. Ordinarily I would not think that an ffunc should have any problem with being executed repeatedly on the same final transvalue. (If you really want to do things that way, maybe your code should take responsibility for keeping a flag to execute just once, rather than pushing the cost onto everybody.)
Comments anyone?
As someone who makes use of C language aggregate functions, I agree with your analysis, so long as the fact that an ffunc may be invoked more than once is well documented, (i.e. an SGML <note> section might be nice.)
Mike Mascari
---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings