Re: Loose ends in PG XML patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Loose ends in PG XML patch
Date
Msg-id 3369.1166978341@sss.pgh.pa.us
Whole thread Raw
In response to Loose ends in PG XML patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Loose ends in PG XML patch  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
List pgsql-hackers
I wrote:
> * I'm also quite afraid of xml_errmsg remaining non-null when the
> storage it points at has been deallocated.  Since this is apparently
> only intended as debug support, maybe we could compile it only in debug
> builds, to reduce the probability that it will fail in production?

Actually, there's an easier and cleaner way to do the whole thing:
replace the handwritten management of xml_errmsg with a StringInfo
buffer allocated in TopMemoryContext, so that it never goes away after
having been first created.  I'll go fix that.

What I'm wondering about is why this printout is emitted as a separate
DEBUG message ... wouldn't it be better to incorporate it as the DETAIL
field of the error message?
        regards, tom lane


pgsql-hackers by date:

Previous
From: ohp@pyrenet.fr
Date:
Subject: Re: libxml on unixware
Next
From: "Nikolay Samokhvalov"
Date:
Subject: Re: Loose ends in PG XML patch