Re: PostgreSQL vs SQL/XML Standards - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: PostgreSQL vs SQL/XML Standards
Date
Msg-id CAFj8pRBffQViaKZsTQVTOXFrnAnz9+-FFrk2joB2a_o5o1r9UQ@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL vs SQL/XML Standards  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers


pá 8. 3. 2019 v 19:48 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:


pá 8. 3. 2019 v 19:44 odesílatel Alvaro Herrera <alvherre@2ndquadrant.com> napsal:
On 2019-Mar-08, Alvaro Herrera wrote:

> > Maybe we can call explicitly xmlFreeDoc instead xmlFreeNode
> >
> > some like
> >
> > if (cur_copy->type == XML_DOCUMENT_NODE)
> >   xmlFreeDoc((xmlDocPtr) cur_copy);
> > else
> >   xmlFreeNode(cur_copy);
> >
> > This looks most correct fix for me. What do you think?
>
> Seems like that should work, yeah ...

Something like this perhaps?  Less repetitive ...

Thank you for commit.

the commit message is not correct. xmlCopyNodes does owns works well, but the node is broken already, and because we should to call xmlFreeNode, we have a problem.

regards

Pavel


+1

Pavel


--
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Pluggable Storage - Andres's take
Next
From: Amit Kapila
Date:
Subject: Re: Hash index initial size is too large given NULLs or partial indexes