Re: Question on triggers...
От | Stephan Szabo |
---|---|
Тема | Re: Question on triggers... |
Дата | |
Msg-id | Pine.BSF.4.21.0109271434150.22313-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Question on triggers... (<cveridis@yahoo.com>) |
Список | 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 по дате отправления: