pgsql: Bring some order and sanity to error handling in the xml patch.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Bring some order and sanity to error handling in the xml patch.
Date: 2006-12-24 18:25:59
Message-ID: 20061224182559.5F76B9FA294@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Bring some order and sanity to error handling in the xml patch.
Use a TRY block instead of (inadequate) ad-hoc coding to ensure that
libxml is cleaned up after a failure. Report the intended SQLCODE
instead of defaulting to XX000. Avoid risking use of a dangling
pointer by keeping the persistent error buffer in TopMemoryContext.
Be less trusting that error messages don't contain %.

This patch doesn't do anything about changing the way the messages
are put together --- this is just about mechanism.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
xml.c (r1.4 -> r1.5)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/xml.c.diff?r1=1.4&r2=1.5)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-12-24 19:14:28 pgsql: Make HISTCONTROL=ignoredups work again (broken by misordering of
Previous Message Tom Lane 2006-12-24 18:15:32 Re: Loose ends in PG XML patch