Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2012-12-22 16:11:47 -0500, Tom Lane wrote:
>> BTW, it sure looks to me like transformXmlExpr will get an Assert
>> failure on an already-transformed expression ...
> Yep. I am pretty sure there are others :(
Eyeball inspection doesn't find any: either the output node type is
different, or the function has a guard against repeat analysis, or
it actually is idempotent anyway.
I plan to commit a fix that just adds guards to transformRowExpr and
transformXmlExpr. If you feel like expending more work in this area,
I'd suggest looking into what it would take to remove the requirement
of idempotence. We know at least three places that would need changes
--- what others are there?
regards, tom lane