Re: plpythonu strange syntax error - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: plpythonu strange syntax error
Date
Msg-id 17683.1108736656@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpythonu strange syntax error  (Michele Bendazzoli <mickymouse@mickymouse.it>)
Responses Re: plpythonu strange syntax error
List pgsql-interfaces
Michele Bendazzoli <mickymouse@mickymouse.it> writes:
> Il giorno ven, 18-02-2005 alle 02:56 -0700, Michael Fuhr ha scritto:
>> Does the string that contains the Python code have carriage returns?
>> Python is picky about that; there was a thread about it recently.
>> http://archives.postgresql.org/pgsql-general/2005-01/msg00792.php

> No, absolutely. I try an retry, but I'm not able to add a second line
> without the previsuo error message appears.

> Maybe it is related with a PGAdmin III bug?

Can you create a function that works if you *don't* use pgAdmin to do
it?  Also try pg_dump'ing the function so you can see exactly what
pgAdmin put into it.

I seem to recall that pgAdmin is a bit cavalier about whitespace in
function bodies, which in sanely-defined languages is no big deal
but in Python there are multiple ways in which it will kill you.
This could be either a problem of inconsistent newlines or excess
leading whitespace ...
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Michele Bendazzoli
Date:
Subject: Re: plpythonu strange syntax error
Next
From: Michael Fuhr
Date:
Subject: Re: plpythonu strange syntax error