Thread: pg_dump without data

pg_dump without data

From
Kenneth Gonsalves
Date:
how do i get a dump of a postgresql database without the data?
--
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.sourceforge.net
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Re: pg_dump without data

From
Philip Hallstrom
Date:
> how do i get a dump of a postgresql database without the data?

% pg_dump --help
pg_dump dumps a database as a text file or to other formats.

Usage:  pg_dump [OPTION]... [DBNAME]

.....
  -s, --schema-only        dump only the schema, no data

....

-philip


Re: pg_dump without data

From
Scott Marlowe
Date:
On Fri, 2005-05-06 at 04:14, Kenneth Gonsalves wrote:
> how do i get a dump of a postgresql database without the data?

pg_dump -s for the schema

pg_dumpall -g for the globals, like usernames and all.