On tor, 2009-12-03 at 19:02 -0500, Tom Lane wrote:
> Peter Eisentraut writes:
> > ... So you should not try to assign to
> > the parameters of a function.
>
> If it's allowed in normal Python functions, that definitely needs to be
> documented. Better would be to fix it or at least throw a more
Peter Eisentraut writes:
> ... So you should not try to assign to
> the parameters of a function.
If it's allowed in normal Python functions, that definitely needs to be
documented. Better would be to fix it or at least throw a more
intelligible error ...
regards, tom la
On tor, 2009-12-03 at 14:46 -0800, David Gardner wrote:
> Not sure about the try block being related, I included it in my
> example mostly because the example is a simplified version of some
> code I was working on that had a try/except block.
> I tried the function without the try block and it ra
Not sure about the try block being related, I included it in my example
mostly because the example is a simplified version of some code I was
working on that had a try/except block.
I tried the function without the try block and it raised the same
exception (just uncaught):
CREATE OR REPLACE F
"David Gardner" 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
The following bug has been logged online:
Bug reference: 5232
Logged by: David Gardner
Email address: dgard...@creatureshop.com
PostgreSQL version: 8.4.1
Operating system: Debian, amd64
Description:plpythonu s=s.op() raises an exception
Details:
If I create the foll