Re: create constraint trigger - Mailing list pgsql-sql

From Kyle Bateman
Subject Re: create constraint trigger
Date
Msg-id 39356E57.BCB3A1D5@actarg.com
Whole thread Raw
In response to create constraint trigger  (Kyle Bateman <kyle@actarg.com>)
List pgsql-sql
Kyle Bateman wrote:
Hi Jan:

But when I create it with "create constraint trigger" as shown next, the trigger doesn't seem to be invoked.  It says it is created, but it allows data to pass that would not be allowed with the "create trigger."  So I'm assuming I'm doing something wrong.

create constraint trigger prd_part_tr_iu after insert or update on prd_parm
   deferrable initially deferred
   for each row execute procedure prd_parm_tf_iu();

OK, here's a reply to my own post.  I've got the constraint trigger working now.  The problem was that it was never getting dropped.  I still don't know how to drop the constraint.  I thought by dropping the trigger function it would get the idea.  When I ran the create constraint again, it said it was created (no errors) so I figured everything was OK, but it was still running the previously defined constraint (apparently).

I dropped the table and started from scratch and it seems to work fine now.

So is there a way to "drop constraint trigger" without having to drop the table?

Kyle
 

Attachment

pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [ADMIN] create view security
Next
From: Mike Mascari
Date:
Subject: Re: [GENERAL] TOP SESSIONS?