Thread: sql functions and triggers

sql functions and triggers

From
Andrzej Roszkowski
Date:
Hello!

It is possible to pass ie. insert fields and values to sql function in 
trigger? I want to define a trigger on insert (select delete etc.) and log 
some values in different table(s).

-- 
"Code reviews are like sex, just anyone can do it, but skill and training can 
make you a lot better at it." - LJ
Thomas


Re: sql functions and triggers

From
Karel Zak
Date:
On Wed, Mar 07, 2001 at 03:03:59PM +0100, Andrzej Roszkowski wrote:
> Hello!
> 
> It is possible to pass ie. insert fields and values to sql function in 
> trigger? I want to define a trigger on insert (select delete etc.) and log 
> some values in different table(s).
Sure, see docs about SPI interface or you can try use RULEs for this. 
        Karel

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz