Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.

> 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


pgsql-interfaces by date

Next:From: Michael FuhrDate: 2005-02-18 17:40:07
Subject: Re: plpythonu strange syntax error
Previous:From: Michele BendazzoliDate: 2005-02-18 11:44:47
Subject: Re: plpythonu strange syntax error

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group