Re: plpythonu strange syntax error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michele Bendazzoli <mickymouse(at)mickymouse(dot)it>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: plpythonu strange syntax error
Date: 2005-02-18 14:24:16
Message-ID: 17683.1108736656@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Michele Bendazzoli <mickymouse(at)mickymouse(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Fuhr 2005-02-18 17:40:07 Re: plpythonu strange syntax error
Previous Message Michele Bendazzoli 2005-02-18 11:44:47 Re: plpythonu strange syntax error