Re: Loose ends in PG XML patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Loose ends in PG XML patch
Date: 2006-12-24 16:39:01
Message-ID: 3369.1166978341@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nikolay Samokhvalov 2006-12-24 17:44:00 Re: Loose ends in PG XML patch
Previous Message Tom Lane 2006-12-24 01:44:59 Loose ends in PG XML patch

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Samokhvalov 2006-12-24 17:44:00 Re: Loose ends in PG XML patch
Previous Message ohp 2006-12-24 13:19:37 Re: libxml on unixware