Re: SQL parsing suggestions?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Vance Maverick" <vmaverick(at)pgp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SQL parsing suggestions?
Date: 2006-07-11 18:06:59
Message-ID: b42b73150607111106r64521bdfu545f96356f1842b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/11/06, Vance Maverick <vmaverick(at)pgp(dot)com> wrote:
> I have a PostgreSQL schema definition. I'd like to be able to use it as
> the basis for code generation in a software build process --
> specifically, I want to generate Java enums corresponding to the table
> definitions. However, it would be inconvenient to have to connect to a
> running database during the build.
>
> What approach would people suggest? I'm open to working in any
> language. Are there PostgreSQL parsing tools out there -- perhaps, the
> parser module itself from the database server? Or something from the
> JDBC driver, or the perl or PHP interfaces? Or does anyone have
> experience with other SQL parsers that can handle all the syntax of
> PostgreSQL files?

I would load the schema definition into a postgresql server and then
query information_shcema to introduce formatting :)

In a previous project, I was able go generate COBOL fd files quite
easily from postgresql tables/'views via simple querying off of
information schema.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2006-07-11 18:19:03 Re: [pgadmin-support] Emergency - postgre is not working
Previous Message Guido Neitzer 2006-07-11 18:01:32 Re: pgsql vs mysql