Re: XML/XPath issues: text/CDATA in XMLTABLE, XPath evaluated with wrong context

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Ramanarayana <raam.soft@gmail.com>
Cc: Markus Winand <markus.winand@winand.at>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>
Date: 2019-02-28T10:04:50Z
Lists: pgsql-hackers
čt 28. 2. 2019 v 10:49 odesílatel Ramanarayana <raam.soft@gmail.com> napsal:

> Hi,
> I applied the following patches
>
> 0001-XML-XPath-comments-processing-instructions-array-ind.patch
> <https://www.postgresql.org/message-id/attachment/63467/0001-XML-XPath-comments-processing-instructions-array-ind.patch>
>
> 0002-XML-avoid-xmlStrdup-if-possible.patch
> <https://www.postgresql.org/message-id/attachment/63468/0002-XML-avoid-xmlStrdup-if-possible.patch>
>
>
> Can you let me know what fix is done in patch 002. I will test that as
> well?
>

I afraid so this patch set was not finished, and is not in current
commitfest

please, check this set https://commitfest.postgresql.org/22/1872/

Regards

Pavel



> Regards,
> Ram.
>
> On Thu, 28 Feb 2019 at 15:01, Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>
>>
>>
>> čt 28. 2. 2019 v 9:58 odesílatel Ramanarayana <raam.soft@gmail.com>
>> napsal:
>>
>>> Hi,
>>>
>>>         I have tested the three issues fixed in patch 001. Array Indexes
>>> issue is still there.Running the following query returns ERROR: more
>>> than one value returned by column XPath expression
>>>
>>> SELECT xmltable.*
>>> FROM (SELECT data FROM xmldata) x,
>>> LATERAL XMLTABLE('/ROWS/ROW'
>>> PASSING data
>>> COLUMNS
>>> country_name text PATH 'COUNTRY_NAME/text()' NOT NULL,
>>> size_text float PATH 'SIZE/text()',
>>> size_text_1 float PATH 'SIZE/text()[1]',
>>> size_text_2 float PATH 'SIZE/text()[2]',
>>> "SIZE" float, size_xml xml PATH 'SIZE')
>>>
>>> The other two issues are resolved by this patch.
>>>
>>
>> what patches you are used?
>>
>> Regards
>>
>> Pavel
>>
>>
>>> --
>>> Cheers
>>> Ram 4.0
>>>
>>
>
> --
> Cheers
> Ram 4.0
>

Commits

  1. Remove EState.es_range_table_array.

  2. Rationalize use of list_concat + list_copy combinations.

  3. Cosmetic improvements in setup of planner's per-RTE arrays.

  4. Make better use of the new List implementation in a couple of places

  5. Fix sepgsql test results for commit d97b714a2.

  6. Avoid using lcons and list_delete_first where it's easy to do so.

  7. Remove lappend_cell...() family of List functions.

  8. Clean up some ad-hoc code for sorting and de-duplicating Lists.

  9. Redesign the API for list sorting (list_qsort becomes list_sort).

  10. Remove dead code.

  11. Represent Lists as expansible arrays, not chains of cons-cells.

  12. Standardize some more loops that chase down parallel lists.

  13. Reimplement the linked list data structure used throughout the backend.