From: DGPickett <DGPickett@aol.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: SQL scipts parser
Date: Sat, 28 Feb 2009 15:11:20 -0500
Message-ID: <goc5pa$24vd$1@news.hub.org> (raw)
In-Reply-To: <491f66a50902270722m16bcd0e4ha236878c7691b1f5@mail.gmail.com>
References: <49A80173.5080104@gmail.com>
<491f66a50902270722m16bcd0e4ha236878c7691b1f5@mail.gmail.com>
Maybe if you find an SQL style normalizer/beautifier, the comments will be very easy to find. I should look for myself, as I have a favorite style of line breaks and indentation that I manually employ, over and over (one predicate per line, one column per line, one table name per line, etc.).
"Dave Cramer" <pg@fastcrypt.com> wrote in message news:491f66a50902270722m16bcd0e4ha236878c7691b1f5@mail.gmail.com...
The driver doesn't have anything like that in it. However check out antlr for SQL parsing.
Dave
On Fri, Feb 27, 2009 at 10:06 AM, Maciej Gawinecki <mgawinecki@gmail.com> wrote:
I'm looking for Java open-source SQL script reader/parser.
That would allow me to find SQL comments about tables and columns, usually given in the neighbourhood of CREATE TABLE, ALTER TABLE commands.
I suppose there's something like this in JDBC for PostgreSQL. Can you point me the sources/classes containing such a parser?
Best,
Maciej
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: DGPickett@aol.com
Subject: Re: SQL scipts parser
In-Reply-To: <goc5pa$24vd$1@news.hub.org>
References: <49A80173.5080104@gmail.com> <491f66a50902270722m16bcd0e4ha236878c7691b1f5@mail.gmail.com> <goc5pa$24vd$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox