From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | cveridis(at)yahoo(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Question on triggers... |
Date: | 2001-09-27 21:38:43 |
Message-ID: | Pine.BSF.4.21.0109271434150.22313-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, 23 Sep 2001 cveridis(at)yahoo(dot)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).
From | Date | Subject | |
---|---|---|---|
Next Message | Ian.Willis | 2001-09-27 21:40:29 | Re: My brain hurts - update field based on value of ano |
Previous Message | Ryan Mahoney | 2001-09-27 21:34:27 | Randomize Result Set Order |