From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | andrew(at)dunslane(dot)net |
Cc: | s(dot)ashoke(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Postgresql XML parsing |
Date: | 2014-03-13 00:17:11 |
Message-ID: | 20140313.091711.81423354.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
> On 03/12/2014 09:36 AM, Ashoke wrote:
> > Hi,
> >
> > I am working on adding a functionality to PostgreSQL. I need to parse
> > the XML format query plan (produced by PostgreSQL v9.3) and save it in
> > a simple data structure (say C structure). I was wondering if
...
> The only XML parsing we have is where Postgres is built with libxml,
> in which case we use its parser. But query plan XML is delivered to a
> client (or a log file, which means more or less the same thing
> here).
As a HACKERS' matter, explain output can be obtained from
ExplainPrintPlan() in any format in backend. I don't know if it
is the case though.
> If you want to parse it then it should be parsed in the client
> - that's why we provide it. Inside postgres I don't see a point in
> parsing the XML rather than handling the query plan directly.
>
> The worst possible option would be to make a hand-cut XML parser,
> either in the client or the server - XML parsing has all sorts of
> wrinkles that can bite you badly.
I agree with it. If XML input is not essential, JSON format would
be parsed more easily than xml. 9.3 already intrinsically has a
JSON parser infrastructure available for the purpose.
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2014-03-13 00:20:10 | Re: [PATCH] Store Extension Options |
Previous Message | Robert Haas | 2014-03-13 00:09:23 | 9a57858f1103b89a5674f0d50c5fe1f756411df6 |