Re: Question on triggers... - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Question on triggers...
Date
Msg-id Pine.BSF.4.21.0109271434150.22313-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Question on triggers...  (<cveridis@yahoo.com>)
List pgsql-general
On Sun, 23 Sep 2001 cveridis@yahoo.com wrote:

> I am trying to fire an 'after insert' trigger to update normalized tables
> from a non-normalized table.  My problem is that I don't seem to be able to
> 1: Write a SQL function that allows me to use new.{anything} as a part of
> the function, and 2: I can't seem to access the new. values at the trigger
> level either to pass the variables to a standard function.
>
> Questions:
>     Do I have to use pl/pgsql to access the new. variables, can a SQL
> function be used with a trigger?
I don't think SQL will work for a trigger function since SQL functions
cannot return opaque.

I think any of the pl languages would probably work (as would C), but
that won't help you if you can't get the handler installed.  The plpgsql
handler was probably compiled with postgres (I think it's compiled by
default).  If you're a db admin, you might try issuing the create
function/create procedural language statements yourself (assuming you know
where it's installed on the machine).



pgsql-general by date:

Previous
From: "jcd@sita"
Date:
Subject: Anyone get PHPGroupware running on RedHatLinux 7 ?
Next
From: Frank Albert Ekern
Date:
Subject: Reference users for postgresql