Re: pg_restore -t table doesn't restore PKEY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore -t table doesn't restore PKEY
Дата
Msg-id 1183.1288362640@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore -t table doesn't restore PKEY  ("Jan C." <chaljan@gmail.com>)
Ответы Re: pg_restore -t table doesn't restore PKEY  ("Jan C." <chaljan@gmail.com>)
Список pgsql-general
"Jan C." <chaljan@gmail.com> writes:
> 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 !

Use pg_restore -l, then extract the lines relevant to your table, then
pg_restore -L to restore just the named items.

I think there's a TODO to make pg_restore's -t switch work more like
pg_dump's, but at the moment they're really quite different animals.
pg_restore doesn't have any logic about "oh, if he asked for this
item I bet he wants that one too".

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: create table as select VS create table; insert as select
Следующее
От: Karl Pickett
Дата:
Сообщение: Re: Can Postgres Not Do This Safely ?!?