From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> |
Cc: | Ali Akbar <the(dot)apaan(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [REVIEW] Re: Fix xpath() to return namespace definitions |
Date: | 2014-07-07 23:25:06 |
Message-ID: | 13665.1404775506@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> writes:
> I can confirm that it works fine. I have attached here a very slightly
> tweaked version of the patch (removed trailing whitespace, and changed
> some comment text).
> I'm marking this ready for committer.
I don't know enough about XML/XPATH to know if this is a good idea or not,
but I did go read the documentation of xmlCopyNode(), and I notice it says
the second argument is
extended: if 1 do a recursive copy (properties, namespaces and children
when applicable) if 2 copy properties and namespaces (when applicable)
Do we really want it to "copy children"? Perhaps the value should be 2?
(I have no idea, I'm just raising the question.)
I also notice that it says
Returns: a new #xmlNodePtr, or NULL in case of error.
and the patch is failing to cover the error case. Most likely, that
would represent out-of-memory, so it definitely seems to be something
we should account for.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-07-07 23:44:53 | Re: [PATCH] Improve bytea error messages |
Previous Message | Tom Lane | 2014-07-07 23:07:04 | Re: pg_dump reporing version of server & pg_dump as comments in the output |