Andrew Dunstan <andrew@dunslane.net> writes:
> Patch attached. Also adds a malloc() check that Neil wanted.
Er, what on God's green earth is elog.c doing malloc'ing stuff at all?
This should be a palloc in the ErrorContext; that's what it's for.
As is, this code is guaranteed to fail under out-of-memory conditions.
regards, tom lane