Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)
Дата
Msg-id 971254BD-6919-41BB-8D26-160C14D5BFE2@gmail.com
обсуждение исходный текст
Ответ на Disabling triggers with psql (gforge 7.4 to 8.2 migration)  (Iñigo Martinez Lasala <imartinez@vectorsf.com>)
Ответы Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)  (Iñigo Martinez Lasala <imartinez@vectorsf.com>)
Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)  (Iñigo Martinez Lasala <imartinez@vectorsf.com>)
Список pgsql-admin

On Feb 10, 2010, at 4:30 AM, Iñigo Martinez Lasala wrote:

Third one, and we haven't been able to fix it, is we cannot restore data dump via psql due to psql does not have an option to disable triggers. So, when restoring data, it fails. So... is there any way to disable in a psql session all triggers same way like with pg_restore --disable-triggers?  Or can we convert plain text dump to be processed by pg_restore? Perhaps a table by table trigger disabling script?

How about:
 1. restore your schema, with triggers, using a pg_dump --schema-only ... ; pg_restore ... 
 2. Create a psql-loadable data-only dump using pg_dump --data-only --disable-triggers --format=p ...
 3. clean the data-only dump and restore

Or, you could do a full pg_dump -Fc ... of your database, then use pg_restore to restore the compressed dumpfile into a plaintext file (i.e. pg_restore [options] filename). Then run your cleanup on the plaintext file, and reload. 

Josh

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

Предыдущее
От: Iñigo Martinez Lasala
Дата:
Сообщение: Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)
Следующее
От: Iñigo Martinez Lasala
Дата:
Сообщение: Re: Disabling triggers with psql (gforge 7.4 to 8.2 migration)