Re: plpython triggers TD["new"] = None

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Lee Jensen <ljensen(at)carriersales(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: plpython triggers TD["new"] = None
Date: 2005-01-27 22:34:55
Message-ID: 20050127223455.GA47584@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2005-01-27 22:39:41 Re: plpython triggers TD["new"] = None
Previous Message Michael Fuhr 2005-01-27 22:20:01 Re: 8.0.0 make check fails on Solaris 9 (sparc)