pg_restore -t table doesn't restore PKEY

From: "Jan C(dot)" <chaljan(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_restore -t table doesn't restore PKEY
Date: 2010-10-29 09:10:16
Message-ID: AANLkTi=vaYPG4Wq+vohLY56F5ETrFXTNZ-EzCXTiMf4C@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
I have dump of an entire database and I'm trying to restore only one named
table:

> pg_restore --format=c -C -U myUser -d myDB /tmp/mydump -t my_table

The command completes without errors/warnings but the resulting table in the
database is missing the PKEY constraint !

Is this done on purpose ? What is the correct way to restore a named table
?

I know I can use the -t switch during the dump and then restore without
using -t but I would like to avoid this solution. The files I can work on
are dumps of the entire DB.

Thanks for your help,
Jan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2010-10-29 09:23:58 Re: create table as select VS create table; insert as select
Previous Message Peter Geoghegan 2010-10-29 07:53:03 Re: Can Postgres Not Do This Safely ?!?