Re: Fix XML handling with DOCTYPE - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Fix XML handling with DOCTYPE
Date
Msg-id 5C9C06DB.6090901@anastigmatix.net
Whole thread Raw
In response to Re: Fix XML handling with DOCTYPE  (Chapman Flack <chap@anastigmatix.net>)
Responses Re: Fix XML handling with DOCTYPE
List pgsql-hackers
On 03/27/19 19:07, Chapman Flack wrote:
> xml-functions-type-docfix-5.patch attached, with node-sets instead of
> nodesets, libxml2 instead of libxml, and parenthesized full sentences
> now au naturel.
> 
> I ended up turning the formerly-parenthesized note about libxml2's
> node-set ordering into a DocBook <note>: there is really something
> parenthetical about it, with the official statement of node-set
> element ordering being that there is none, and the description of
> what the library happens to do being of possible interest, but set
> apart, with the necessary caveats about relying on it.

I have just suffered a giant sinking feeling upon re-reading this
sentence in our XMLTABLE doc:

  A column marked FOR ORDINALITY will be populated with row numbers
  matching the order in which the output rows appeared in the original
  input XML document.

I've been skimming right over it all this time, and that right there is
a glaring built-in reliance on the observable-but-disclaimed iteration
order of a libxml2 node-set.

I'm a bit unsure what any clarifying language should even say.

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: Fix XML handling with DOCTYPE
Next
From: David Rowley
Date:
Subject: Re: Berserk Autovacuum (let's save next Mandrill)