Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Generate SQ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 15726 of 17437
Post > Topic >>

Re: Generate SQL Statements

by scrawford@[EMAIL PROTECTED] (Steve Crawford) Jun 3, 2008 at 05:10 PM

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


-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 2 Posts in Topic:
Re: Generate SQL Statements
scrawford@[EMAIL PROTECTE  2008-06-03 17:10:43 
Re: Generate SQL Statements
terry@[EMAIL PROTECTED]   2008-06-04 01:40:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 12:04:23 CST 2008.