From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Triggers |
Date: | 2002-08-16 14:00:23 |
Message-ID: | 1029506424.28779.564.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 2002-08-16 at 14:42, Jean-Christian Imbeault wrote:
> I have a with a a column defined as not null. The value however can be
> found by looking it up in another table. I would like to create a
> trigger that after insert would look up the need value and put it in the
> record being inserted.
>
> Unfortunately the column is defined as not null so I fear the insert
> would fail and the trigger never get called. How can I get around this?
Surely you can use a BEFORE trigger, can't you?
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And whatsoever ye shall ask in my name, that will I
do, that the Father may be glorified in the Son."
John 14:13
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Gibbs | 2002-08-16 14:03:40 | Re: Triggers |
Previous Message | Tom Lane | 2002-08-16 13:56:58 | Re: writing own cast |