Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-hackers by date

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

pgsql-committers by date

Next:From: Nikolay SamokhvalovDate: 2006-12-24 17:44:00
Subject: Re: Loose ends in PG XML patch
Previous:From: Tom LaneDate: 2006-12-24 01:44:59
Subject: Loose ends in PG XML patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group