Re: BUG #5232: plpythonu s=s.op() raises an exception

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5232: plpythonu s=s.op() raises an exception
Дата
Msg-id 15713.1259879438@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5232: plpythonu s=s.op() raises an exception  ("David Gardner" <dgardner@creatureshop.com>)
Ответы Re: BUG #5232: plpythonu s=s.op() raises an exception  (David Gardner <dgardner@creatureshop.com>)
Список pgsql-bugs
"David Gardner" <dgardner@creatureshop.com> writes:
> CREATE OR REPLACE FUNCTION pyreplace(src text,s text)
>   RETURNS text AS
> $BODY$
> try:
>     src=src.replace(s,'')
>     return src
> except Exception,e:
>     return str(e)
> $BODY$
>   LANGUAGE 'plpythonu' VOLATILE
>   COST 100;

Weird.  You seem to need both the try block and the overwrite of the
parameter to make it misbehave.  I suspect this means we're doing
something a bit wrong in setting up the python variable for the
parameter.  Unfortunately I don't know enough about python to go further
than that.

            regards, tom lane

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

Предыдущее
От: "Fredrik Palm"
Дата:
Сообщение: Re: BUG #5229: Queing requests when not using psql
Следующее
От: David Gardner
Дата:
Сообщение: Re: BUG #5232: plpythonu s=s.op() raises an exception