"Helmar Spangenberg" <hspangenberg(at)frey(dot)de> writes:
> Referring to the manual, I can pfree the result returned by SPI_getvalue.
Well, the result is the output of a datatype output function. I think
that's palloc'd by all standard datatypes, but maybe you're working with
a custom datatype that tries to return a constant string?
regards, tom lane