Search Postgresql Archives

Re: Reverse-engineering table creation statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pg_dump --schema-only --schema=SCHEMA --table=TABLE
 
produces creation script.
 
Chris
 
http://www.postgresql.org/docs/8.0/interactive/backup.html
 

From: thombrown@xxxxxxxxx
Date: Mon, 14 Sep 2009 16:15:23 +0100
Subject: Reverse-engineering table creation statements
To: pgsql-general@xxxxxxxxxxxxxx

Is there a simple way of generating a creation statement for a table without using psql or pgAdmin.  Basically I'd like to create what pgAdmin III shows in the SQL pane when you click on a table.  MySQL appears to have an equivalent which is SHOW CREATE table [tablename].

Thanks

Thom


Less clicking: Hotmail access on the new MSN homepage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux