Re: pg_restore - table restoration

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: pg_restore - table restoration
Дата
Msg-id 52D4646B.6000403@gmail.com
обсуждение исходный текст
Ответ на pg_restore - table restoration  ("Day, David" <dday@redcom.com>)
Список pgsql-general
On 01/13/2014 01:43 PM, Day, David wrote:
> Hi,
>
> This is sort of a continuation of = problems I was working on last week
>
> with selective restorations of an archive file at the schema or table
> level.  ( V9.3)
>
> Given that I dumped the entire database ( pg_dump –Fc  my_db –f
> archive_file )
>
> When I pg_restore an entire schema ( -n ) everything is wonderful.
>
> If I try to attempt two tables in one of the schemas I encounter problems.
>
> I get a success of sort with these option  variations:
>
> pg_restore -c  -t tbl1 –t tbl2 –U <username> -d my_db  archive_file
>
> In this case the tables are recreated with data but all the original
>   constraints for these tables are missing
>
> As are triggers that are associated with the tables.   I guess I can
> understand this.

I just tried something similar here and I am not seeing that. I see
constraints and triggers.

Is there anything in the log that might help?


>
> Is this a bug or a mis-understanding on my part?

One thing you can do to help see what is going on is restore to a file
instead of the database. This creates a plain text file with the SQL
statements. So:

  pg_restore -c  -t tbl1 –t tbl2 –U <username> -f plain_text.sql
archive_file

>
> Regards
>
> Dave Day
>


--
Adrian Klaver
adrian.klaver@gmail.com


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

Предыдущее
От: "Day, David"
Дата:
Сообщение: pg_restore - table restoration
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: pg_restore - table restoration