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

From
Subject Question on triggers...
Date
Msg-id 3baed392$1_1@news.greatbasin.net
Whole thread Raw
Responses Re: Question on triggers...
List pgsql-general
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?
    how can I access the inserted row info from the trigger level without
using C?

My problem here is that I have a major DICK as a system admin on the hosting
site I use, and getting him to add new parts/libraries to the PGSQL install
will take weeks, so all I have is SQL to write my triggers/functions in.
Using C is not a viable option basically for the same reason.  Is there any
way to do this??

Michael Freeman



pgsql-general by date:

Previous
From: "Brian C. Doyle"
Date:
Subject: Function Help
Next
From: "Marinos J. Yannikos"
Date:
Subject: Re: How to make a REALLY FAST db server?