Re: Help! Database restored with disabled triggers

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Joe Kramer <cckramer(at)gmail(dot)com>
Subject: Re: Help! Database restored with disabled triggers
Date: 2009-09-23 14:02:59
Message-ID: 200909230702.59884.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 22 September 2009 7:28:03 pm Joe Kramer wrote:
> I have database backup schema+data in text (non-compressed) format.
> Backup is created using "pg_dump -i -h ... -U ... -f dump.sql".
> I run it with "psql <dump.sql" but after restore all triggers are disabled!
>
> I can't use this text dump with pg_restore because it only accept
> archived dumps. And I am not sure that using pg_restore will solve
> disabled triggers problem.
> I need to have the backup in text format so I can open and edit it.
>
> There was a recipe earlier in this mailing list that involves writing
> a function that will enable all triggers one-by-one. But I want to do
> it a proper way, without such "hacking".
>
> What would be the solution for me?
>
> Thanks.

What version of Postgres are you dumping from, restoring to? Which version of
pg_dump are you using?

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-09-23 14:53:37 Re: Help! Database restored with disabled triggers
Previous Message Tom Lane 2009-09-23 13:58:06 Re: How to have ant's <sql> task insert special chars appropriately?