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
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match