On Thu, Jan 27, 2005 at 03:13:27PM -0700, Lee Jensen wrote:

> I have postgres 7.4.6 installed on 2 machines one debian and one 
> freebsd. Both are the most recent installs of each OS. On both I have 
> the plpython module and both are having the same issue. Essentially when 
> a function is called from a trigger the TD tuple get's populated with 
> all the standard data except new and old have no value (None). Here is 
> the function code I am working with:

[snip]

> CREATE TRIGGER trig
>  BEFORE INSERT OR UPDATE
>  ON public.test
>  FOR EACH STATEMENT
            ^^^^^^^^^
>  EXECUTE PROCEDURE public.test_trigger();

OLD and NEW don't make sense in statement-level triggers because
the statement could affect many rows.  Use FOR EACH ROW if you need
to access the row values.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to