| From: | Lee Jensen <ljensen(at)carriersales(dot)com> |
|---|---|
| To: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | plpython triggers TD["new"] = None |
| Date: | 2005-01-27 22:13:27 |
| Message-ID: | 41F96787.3070806@carriersales.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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:
CREATE OR REPLACE FUNCTION public.test_trigger() RETURNS trigger AS
'
plpy.error(TD)
return "OK"
' LANGUAGE 'plpythonu';
The actual trigger is defined as follows:
CREATE TRIGGER trig
BEFORE INSERT OR UPDATE
ON public.test
FOR EACH STATEMENT
EXECUTE PROCEDURE public.test_trigger();
The following error is generated on both machines when an insert occurs:
ERROR: plpython: function "test_trigger" failed
DETAIL: plpy.Error: ({'relid': '17246', 'old': None, 'name': 'trig',
'level': 'STATEMENT', 'args': None, 'when': 'BEFORE', 'new': None,
'event': 'INSERT'},)
Any help would be appreciated. Most likely I've done something wrong
somewhere.
Lee
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2005-01-27 22:20:01 | Re: 8.0.0 make check fails on Solaris 9 (sparc) |
| Previous Message | Tamas Vincze | 2005-01-27 22:11:16 | Re: 8.0.0 make check fails on Solaris 9 (sparc) |