Re: patch: function xmltable
От | Pavel Stehule |
---|---|
Тема | Re: patch: function xmltable |
Дата | |
Msg-id | CAFj8pRCPm2Y76NtWM1z1tFyWttyp482cAgF0+PH7+zZs34NysQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: patch: function xmltable (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Список | pgsql-hackers |
2016-11-24 0:29 GMT+01:00 Alvaro Herrera <alvherre@2ndquadrant.com>:
Here's another version. Not there yet: need to move back the functionthe COLUMNS option (which is what I was hoping for with the "PATH '/'").
to create the tupdesc, as discussed. Not clear what's the best place,
however. I modified the grammar a bit (added the missing comma, removed
PATH as an unreserved keyword and just used IDENT, removed the "Opt"
version for column options), and reworked the comments in the transform
phase (I tweaked the code here and there mostly to move things to nicer
places, but it's pretty much the same code).
In the new xpath_parser.c file I think we should tidy things up a bit.
First, it needs more commentary on what the entry function actually
does, in detail. Also, IMO that function should be at the top of the
file, not at the bottom, followed by all its helpers. I would like some
more clarity on the provenance of all this code, just to assess the
probability of bugs; mostly as it's completely undocumented.
I don't like the docs either. I think we should have a complete
reference to the syntax, followed by examples, rather than letting the
examples drive the whole thing. I fixed the synopsis so that it's not
one very long line.
If you use "PATH '/'" for a column, you get the text for all the entries
in the whole XML, rather than the text for the particular row being
processed. Isn't that rather weird, or to put it differently, completely
wrong? I didn't find a way to obtain the whole XML row when you have
This is a libxml2 behave
Postprocessing only check result and try to push the result to expected types.
Regards
Pavel
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: