Re: pg_dump -- data and schema only? - Mailing list pgsql-hackers

From Tino Wildenhain
Subject Re: pg_dump -- data and schema only?
Date
Msg-id 1123169927.15416.70.camel@sabrina.peacock.de
Whole thread Raw
In response to pg_dump -- data and schema only?  ("Mark Woodward" <pgsql@mohawksoft.com>)
Responses Re: pg_dump -- data and schema only?  ("Mark Woodward" <pgsql@mohawksoft.com>)
List pgsql-hackers
Am Donnerstag, den 04.08.2005, 10:26 -0400 schrieb Mark Woodward:
> I haven't seen this option, and does anyone thing it is a good idea?
> 
> A option to pg_dump and maybe pg_dump all, that dumps only the table
> declarations and the data. No owners, tablespace, nothing.
> 
> This, I think, would allow more generic PostgreSQL data transfers.

pg_dump -s maybe?

See man pg_dump: 
      -s
      --schema-only             Dump only the object definitions (schema), not data.

Usually one dumps the database with -Fc and then construct
SQL for data and DDL via pg_restore from this binary dump.
You can then use pg_restore -l, edit (for example via sed)
and use it with -L to only generate SQL for these objects.

-- 
Tino Wildenhain <tino@wildenhain.de>



pgsql-hackers by date:

Previous
From: "Mark Woodward"
Date:
Subject: US Census database (Tiger 2004FE) - 4.4G
Next
From: "Mark Woodward"
Date:
Subject: Re: pg_dump -- data and schema only?