Обсуждение: pg_restore problem to load constraints with tables

Поиск
Список
Период
Сортировка

pg_restore problem to load constraints with tables

От
Fabrice Chapuis
Дата:
Hi,
When a table is reloaded wit pg_restore, it is recreated without indexes or constraints. There are automatically skipped. Is there a reason for this?

g_restore -j 8 -v -d zof /shared/pgdump/aq/backup/dbtest/shtest --no-owner --role=test -t  mytable 2>&1 | tee -a dbest.log 

pg_restore: skipping item 7727 SEQUENCE SET xxx_seq
pg_restore: skipping item 5110 INDEX xxxxx_cons
pg_restore: skipping item 5143 CONSTRAINT xxx 
pg_restore: skipping item 5670 FK CONSTRAINT xxx

Thanks for your feedback

Fabrice


Re: pg_restore problem to load constraints with tables

От
Tom Lane
Дата:
Fabrice Chapuis <fabrice636861@gmail.com> writes:
> When a table is reloaded wit pg_restore, it is recreated without indexes or
> constraints. There are automatically skipped. Is there a reason for this?

[ shrug ] That's how the -t switch is defined.  If you want something
else, you can use the -l and -L switches to pick out a custom
collection of objects to restore.

            regards, tom lane