Tom Lane wrote:
> Well, xml_init calls xmlInitParser() which needs to be cleaned up.
> But since xmlelement doesn't need that, maybe we should factor it
> out of xml_init.

That could help.

> As for the try/catch blocks instead of relying on memory context
> cleanup, I'm not entirely sure if that's still needed or if it's a
> hangover from before we understood how to use xmlMemSetup.

It's for the xmlCleanupParser().

> The note 
> at line 27ff of xml.c implies that libxml keeps static pointers to
> allocated things that it thinks will survive indefinitely, so we
> may have to have these.  I'm suspicious whether xmlelement doesn't
> have a problem if the called expressions error out ...

Hmm.  That could also be fixed if we separated xml_init() and 
xmlInitParser().
-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to