question on parsing postgres sql queries - Mailing list pgsql-general

From Jerome Wagner
Subject question on parsing postgres sql queries
Date
Msg-id CA+=V_fO57GU4xuDzRL1bpxw2W4q0EWX1mcjbLoN3H_FjU9XV4A@mail.gmail.com
Whole thread Raw
Responses Re: question on parsing postgres sql queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: question on parsing postgres sql queries  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hello,

I am doing some research on postgres sql query parsing.

I have found the https://github.com/lfittl/libpg_query project which manages to re-use the native postgres server parser. For using this, you need to accept an external dependency on a lib compiled out of the postgres source.

I was wondering what people think of the conformance with regards to the real parser of the documentations on 

Would it make sense to use these sgml synopsis as some kind of source of truth, parse them, and automatically generate a parser for a specifc language ?

This could enable the creation of parsers for different languages using parser generators based on the synopsis.

I feel like the conformance level of the documentation is high and that the sgml synopis seem to be nearly programmatically sufficient to create parsers.

what do you think ?

Could the parser commiters share some lights on how the documentation process interacts with the parser commits ?

Thanks,
Jerome

pgsql-general by date:

Previous
From: Dev Kumkar
Date:
Subject: Re: How to stop script executions
Next
From: Matthew Musgrove
Date:
Subject: Re: Weirdness with the stats collector process