| From: | Tino Wildenhain <tino(at)wildenhain(dot)de> |
|---|---|
| To: | Mark Woodward <pgsql(at)mohawksoft(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pg_dump -- data and schema only? |
| Date: | 2005-08-04 15:59:41 |
| Message-ID: | 1123171181.15416.77.camel@sabrina.peacock.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Am Donnerstag, den 04.08.2005, 11:52 -0400 schrieb Mark Woodward:
> > 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.
> >
>
> Actually, there isn't a setting to just dump the able definitions and the
> data. When you dump the schema, it includes all the tablespaces,
> namespaces, owners, etc.
>
> Just the table nd object declarations and data would be useful.
Reread my comment on the -l / -L option to pg_restore. You can
do all that with it :-)
--
Tino Wildenhain <tino(at)wildenhain(dot)de>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2005-08-04 16:09:33 | buildfarm happenings |
| Previous Message | Mark Woodward | 2005-08-04 15:52:35 | Re: pg_dump -- data and schema only? |