plpython triggers TD["new"] = None

Поиск
Список
Период
Сортировка
От Lee Jensen
Тема plpython triggers TD["new"] = None
Дата
Msg-id 41F96787.3070806@carriersales.com
обсуждение исходный текст
Ответы Re: plpython triggers TD["new"] = None  (Michael Fuhr <mike@fuhr.org>)
Re: plpython triggers TD["new"] = None  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tamas Vincze
Дата:
Сообщение: Re: 8.0.0 make check fails on Solaris 9 (sparc)
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: 8.0.0 make check fails on Solaris 9 (sparc)