Re: Triggers don't activate when dropping table

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: cheng shan <postgresql_general(at)yahoo(dot)com(dot)cn>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Triggers don't activate when dropping table
Date: 2004-12-07 04:46:19
Message-ID: 20041207044619.GA33139@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 07, 2004 at 11:44:58AM +0800, cheng shan wrote:

> I have one table named "object" and i many tables that are related
> to the table "object". When a record in "object" is deleted, the
> relative records in other tables should also be erased. To implement
> the above goal, i define many triggers on table "object" to make
> operations automatically.
>
> But i find that the triggers don't activate when i dropping the
> table "object". So there is many garbage information left in the
> system which makes the system unstable.

If you want to fire the triggers then delete all records from the
table before dropping it. But why are you dropping the table?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2004-12-07 04:50:40 Re: Rules
Previous Message Christopher Browne 2004-12-07 04:17:21 Re: When to encrypt