From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | alexandre - aldeia digital <alepaes(at)aldeiadigital(dot)com(dot)br> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dump -t <> pg_restore -t |
Date: | 2006-04-26 18:53:19 |
Message-ID: | 444FC19F.1020903@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
alexandre - aldeia digital wrote:
> Hi,
>
> If I do:
>
> pg_dump -Fc -t TABLE database > table-custom.sql
>
> The pg_dump returns the DDL of the table, the data and the DDL for
> indexes and PK. If I use -s, only the structure is returned but it's
> include all elements.
>
> But if I do:
>
> pg_dump -Fc database > backup-custom.file
> pg_restore -Fc -t TABLE backup-custom.file > table-plain.sql
>
> Only the DDL of table and data is returned, but not indexes, etc.
>
> Question:
>
> How can I restore a table with all other dependences from a custom file
> database ?
The -l / -L options let you create/read back a control file listing all
the database objects. You can comment out/edit this to control pretty
much everything.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2006-04-26 18:55:49 | Clustered table order is not preserved on insert |
Previous Message | alexandre - aldeia digital | 2006-04-26 17:06:08 | pg_dump -t <> pg_restore -t |