[GENERAL] How to use the SQL parser subsystem

2007-01-04 Thread Ravindra Jaju
Hi. Is it possible to use the SQL parser embedded inside the postgres code via some public API? I wish to get a parsed SQL query in any format which lends itself to easy analysis (structural, for example) so as to be able to find similarities between queries. I tried peeking around a bit, and tr

Re: [GENERAL] How to use the SQL parser subsystem

2007-01-04 Thread Ravindra Jaju
ards, jaju On 1/4/07, Martijn van Oosterhout wrote: On Thu, Jan 04, 2007 at 08:01:17PM +0530, Ravindra Jaju wrote: > I tried peeking around a bit, and tried pulling out src/backend/parser - but > that depends on other parts of the code, making it a bit non-trivial. Plus, > any chang

Re: [GENERAL] How to use the SQL parser subsystem

2007-01-04 Thread Ravindra Jaju
On 1/4/07, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: > 3] If not, what would be a better mechanism to re-use all the work already > done in postgres for SQL analysis? One idea would be writing a PostgreSQL function which calls raw_parser() and returns the parse tree as a texual representaion. An