Michael Fuhr <mike(at)fuhr(dot)org> writes:
> I can consistenly produce a core dump by calling a function that
> executes PREPARE...INSERT or PREPARE...UPDATE, then calling it again.
I think this is a variant of the same problem recently detected with
DECLARE CURSOR, ie, PREPARE had better copy the source parsetree before
letting the planner touch it.
regards, tom lane