Archive for March 1st, 2009

Dumping a PostgreSQL database without the data is easy. Issue the below command and it will output the database table structure to a text file that can easily be imported.

pg_dump -U postgres --schema-only DBNAME -f FILENAME.sql

The above can be imported into a new database using the below syntax.

psql -U postgres DBNAME < FILENAME.sql

SQL in a Nutshell (In a Nutshell (O'Reilly)) (Paperback)

By (author): Kevin Kline, Brand Hunt, Daniel Kline

List Price: $44.99 USD
New From: $24.99 USD In Stock
Used from: $16.91 USD In Stock

Tags: , , , , , , , ,

Comments No Comments »