On 2012-10-19, Victor Sterpu wrote:
> I have this trigger that works fine. The trigger prevents the deletion
> of the last record.
> But I want skip this trigger execution when the delete is done from a
> external key.
> How can I do this?
perhaps you have to use a rule instead of a trigger?
-
> -Original Message-
> From: [email protected] [mailto:pgsql-sql-
> [email protected]] On Behalf Of Victor Sterpu
> Sent: Friday, October 19, 2012 2:15 PM
> To: [email protected]
> Subject: [SQL] Trigger triggered from a foreign key
>
>
I have this trigger that works fine. The trigger prevents the deletion
of the last record.
But I want skip this trigger execution when the delete is done from a
external key.
How can I do this?
This is the fk
ALTER TABLE focgdepartment
ADD CONSTRAINT fk_focgdep_idfocg FOREIGN KEY (idfocg)