Problem about export/import postgresql tables use pg_dump/pg_restore

From: "Ma, Dong (Vincent(at)BAS-BECOM-BJ)" <dong(dot)ma(at)hp(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Problem about export/import postgresql tables use pg_dump/pg_restore
Date: 2010-02-08 08:18:07
Message-ID: D06F06C893D0E841842259823E18FC8A2F44499199@GVW1159EXB.americas.hpqcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

Recently I want to import a new table into a existing database, I run with follow steps:

1. Export my whole database schema from test machine database: pg_dump -s -F t -f dumpfile database

2. Import only one table into existing database: pg_restore -F t -d database -t tablename dumpfile

The problem is the table 'tablename' schema import correctly, but didn't import the indexes, constrains and column comments of this table. Can somebody do me a favor about understanding why this doesn't work?

Thanks,
Best Regards,
Vincent Ma(Ma Dong)

Hewlett-Packard Co.
IDD: +86 010 6564 5733
Email: dong(dot)ma(at)hp(dot)com<mailto:dong(dot)ma(at)hp(dot)com>

Browse pgsql-general by date

  From Date Subject
Next Message jehanzeb mirza 2010-02-08 08:47:26
Previous Message John R Pierce 2010-02-08 06:33:58 Re: overhead for stats_row_level