Tom Lane wrote:

Andrew Dunstan <[EMAIL PROTECTED]> 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.

Well, it's a one-off allocation into a static variable, if that makes any difference. If not, I accept the rebuke :-)

I first published the ancestor of this code many months ago, and nobody has objected until now. But there is always room for improvement I guess, including in my own knowledge. I'll be happy to change it if need be.



---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to