Thread: Using triggers with non-C functions

Using triggers with non-C functions

From
Bruce Momjian
Date:
Now that I know that triggers can call non-C functions, I would like to
know how non-C functions access information about the triggered row.

I see plpgsql has an interface to the trigger information.  Do SQL
functions us OLD/NEW to reference that information, like they do in
rules?

The trigger programmers guide page says PROCEDURE is a C function, so I
will need to correct that:
Procedure     The procedure name is the C function called. 


--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Using triggers with non-C functions

From
Alex Perel
Date:
On Wed, 17 May 2000, Bruce Momjian wrote:

Well, I know that with PL/pgSQL you use NEW and OLD, but I'm not
sure how this works with other languages.

> Now that I know that triggers can call non-C functions, I would like to
> know how non-C functions access information about the triggered row.
> 
> I see plpgsql has an interface to the trigger information.  Do SQL
> functions us OLD/NEW to reference that information, like they do in
> rules?
> 
> The trigger programmers guide page says PROCEDURE is a C function, so I
> will need to correct that:
> 
>     Procedure
>     
>          The procedure name is the C function called. 
> 
> 
> 

--      Alex G. Perel  -=-  AP5081
veers@disturbed.net  -=-  veers@webhosting.com              play  -=-  work                       
Disturbed Networks - Powered exclusively by FreeBSD
== The Power to Serve -=- http://www.freebsd.org/