differences between pg_dump and pg_restore with -t

From: alexandre - aldeia digital <alexandre(at)ad2(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: differences between pg_dump and pg_restore with -t
Date: 2006-02-13 17:08:20
Message-ID: 43F0BD04.4080405@ad2.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

If I do:

pg_dump -Fc -t table database > table.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, but all is returned.

But if I do:

pg_dump -Fc database > backup.file
pg_restore -Fc -t table backup.file > table.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 ?

PG: 8.1.2 and 8.0.6

Thanks,

Alexandre

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2006-02-13 17:19:11 Re: Why does an ON SELECT rule have to be named "_RETURN"?
Previous Message John D. Burger 2006-02-13 16:57:42 Re: using schema-qualified names in INSERTs