Re: [REVIEW] Re: Fix xpath() to return namespace definitions - Mailing list pgsql-hackers

From Ali Akbar
Subject Re: [REVIEW] Re: Fix xpath() to return namespace definitions
Date
Msg-id CACQjQLox2XyUS6+raDjjXtb+Cunb2Fu7YON3mpGX=gnoNUx4nw@mail.gmail.com
Whole thread Raw
In response to Re: [REVIEW] Re: Fix xpath() to return namespace definitions  (Ali Akbar <the.apaan@gmail.com>)
Responses Re: [REVIEW] Re: Fix xpath() to return namespace definitions  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
2014-12-14 22:18 GMT+07:00 Ali Akbar <the.apaan@gmail.com>:

I ran a test using postgres-US.fo built in the PostgreSQL source tree,
which is 38 MB, and ran

select unnest(xpath('//fo:bookmark-title', b, array[array['fo',
'http://www.w3.org/1999/XSL/Format']])) from data;

(Table contains one row only.)

The timings were basically indistinguishable between the three code
versions.

I'll try to reproduce your test.  How big is your file?  Do you have a
link to the actual file?  Could you share your load script?

Basically i loaded the xml to table u 100 times. Load script attached.

Peter, while reviewing the better performing patch myself, now i think the patch needs more work to be committed. The structuring of the method will be confusing in the long term. I think i'll restructure the patch in the next commitfest.

So i propose to break the patch:
1. We apply the current patch which uses xmlNodeCopy, so that the long-standing bug will be fixed in postgres.
2. I'll work with the performance enhancement in the next commitfest.

Maybe for (2), the current better-performing patch can be viewed as PoC of the expected performance.

Regards,
--
Ali Akbar

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Custom timestamp format in logs
Next
From: Michael Paquier
Date:
Subject: Re: Custom timestamp format in logs