On Fri, 2003-05-16 at 15:07, Kuhn, Dylan K (4520500D) wrote:
> I'm not deleting all the records, but I could maybe copy the ones I want
> to keep into a temporary table. It looks like I have to somehow disable
> the foreign key constraints that reference the table before truncating
> it. Is this possible?
>
Syntax for 7.2.x is:
UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = 'mytable';
UPDATE pg_class SET reltriggers = (SELECT count(*) FROM pg_trigger where pg_class.oid = tgrelid) WHERE relname =
'mytable';
I think it's the same in 7.3.x, but double check before using it.
Robert Treat