Re: Generate SQL Statements

From: Terry Lee Tucker <terry(at)chosen-ones(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Generate SQL Statements
Date: 2008-06-04 05:40:49
Message-ID: 200806040140.49969.terry@chosen-ones.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 03 June 2008 20:10, Steve Crawford wrote:
> Terry Lee Tucker wrote:
> > Greetings:
> >
> > I was wondering if anyone knows of a third party product that will
> > generate SQL statements for creating existing tables. We have to provide
> > table definition statements for out parent company. Any ideas?
>
> Why 3rd party? How about:
>
> pg_dump --schema-only -t table_name... ?
>
> Alternately, roll-your-own using the system tables. A good place to
> start is by running psql with the --echo-queries option to see the
> queries it runs "behind the scenes". You can read the queries for things
> like "\d+ tablename" then modify them to suit.
>
> Cheers,
> Steve

Now why didn't I think of that :o/

Thanks for the help...
--
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812 Fax: (336) 372-6812 Cell: (336) 404-6987
terry(at)turbocorp(dot)com
www.turbocorp.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Volkan YAZICI 2008-06-04 06:04:26 Re: does postgresql works on distributed systems?
Previous Message Stephen Denne 2008-06-04 04:32:33 Re: [JDBC] How to just "link" to some data feed