| От | Tom Lane |
|---|---|
| Тема | Re: Cannot restore table using pg_restore |
| Дата | |
| Msg-id | 377.1227638829@sss.pgh.pa.us обсуждение |
| Ответ на | Cannot restore table using pg_restore (Bill Todd <pg@dbginc.com>) |
| Список | pgsql-general |
Bill Todd <pg@dbginc.com> writes:
> I am trying to restore a table named contact in the contact schema. I
> have tried two methods. The first is the command
> pg_restore --dbname=app --format=custom --schema=contact
> --table=contact.contact --username=postgres --single-transaction
> contact.backup
The correct incantation is
--schema=contact --table=contact
You can use the qualified-name syntax in pg_dump's --table switch,
but nobody's gotten around to making pg_restore similarly bright.
> pg_restore -L contact.list contact.backup > result.txt
> This also runs without error but does not restore anything.
Well, in that form it's not supposed to do anything except emit SQL
into result.txt --- you probably want to use the -d switch, or else
pipe the SQL into psql.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера