Re: [HACKERS] reparsing query

2015-04-16 Thread Tatsuo Ishii
> It is not difficult to output parsed query in some tool readable > format but it comes with a maintain overhead: once tools rely on it, > we have to conform to some schema continuously, like the xml/xmlns. Do > we want to take this? Depends on how far the tools can go with this > exposed informat

Re: [HACKERS] reparsing query

2015-04-15 Thread Lukas Fittl
On Wed, Apr 15, 2015 at 8:39 PM, Qingqing Zhou wrote: > > It is not difficult to output parsed query in some tool readable > format but it comes with a maintain overhead: once tools rely on it, > we have to conform to some schema continuously, like the xml/xmlns. Do > we want to take this? Depends

Re: [HACKERS] reparsing query

2015-04-15 Thread Qingqing Zhou
On Wed, Apr 15, 2015 at 5:19 PM, Lukas Fittl wrote: > It'd be interesting to explore if there is some way to make this less > hack-ish, and enable tools to parse queries in a better way. Essentially > what is needed is some way to reliably translate SQL into an AST-like > output, from an outside t

Re: [HACKERS] reparsing query

2015-04-15 Thread Lukas Fittl
On Wed, Apr 15, 2015 at 2:43 PM, Qingqing Zhou wrote: > > Is this a proposal to have a better formatted (JSON etc) > debug_print_parse results? I've run into the need for this as well for monitoring purposes, my solution was to compile the needed object files into a library (see [0]). It'd be i

Re: [HACKERS] reparsing query

2015-04-15 Thread Qingqing Zhou
On Wed, Apr 15, 2015 at 2:04 PM, Alvaro Herrera wrote: > His old posting: > https://www.postgresql.org/message-id/1247323023.16438.35.camel%40ab-desktop > Is this a proposal to have a better formatted (JSON etc) debug_print_parse results? Thanks, Qingqing -- Sent via pgsql-hackers mailing li

Re: [HACKERS] reparsing query

2015-04-15 Thread Alvaro Herrera
Qingqing Zhou wrote: > On Wed, Apr 15, 2015 at 1:40 PM, Andrzej Barszcz wrote: > > I knock once again with this : reparse query to XML ( last knock 5-6 years > > before) . > > > > What exactly "reparse query to XML" does? His old posting: https://www.postgresql.org/message-id/1247323023.16438.35

Re: [HACKERS] reparsing query

2015-04-15 Thread Qingqing Zhou
On Wed, Apr 15, 2015 at 1:40 PM, Andrzej Barszcz wrote: > I knock once again with this : reparse query to XML ( last knock 5-6 years > before) . > What exactly "reparse query to XML" does? Regards, Qingqing -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

[HACKERS] reparsing query

2015-04-15 Thread Andrzej Barszcz
Hi I knock once again with this : reparse query to XML ( last knock 5-6 years before) . Motivation: more info for front-end developers about query. Users of jdbc driver are not able to gather information from meta data about such simple query : "select x.a,y.b from xxx x, yyy y" Solution : modif