Re: Trigger function is not called

From: Bill <pg(at)dbginc(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger function is not called
Date: 2008-08-26 03:43:06
Message-ID: 48B37BCA.1000901@dbginc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Bill <pg(at)dbginc(dot)com> writes:
>
>> The thing that has me confused is that the following table, trigger and
>> trigger function work perfectly and the primary key for this table is
>> also bigint not null.
>>
>
> Actually, after looking closer, I think the problem with your previous
> example is that you created an ON UPDATE trigger not an ON INSERT
> trigger. Table constraints are indeed enforced after before-triggers
> fire, as a quick look at the code proves. Sorry for the misinformation.
>
> regards, tom lane
>
>
>
I knew I was missing something really simple. I changed the trigger to
before insert and everything works perfectly. Thanks again for your
help. I learned a lot.

Bill

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vishal Arora 2008-08-26 04:18:02 Re: Regarding access to a user
Previous Message Tom Lane 2008-08-26 03:38:13 Re: Trigger function is not called