pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michele Bendazzoli <mickymouse@mickymouse.it>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql <pgsql-interfaces@postgresql.org>
Subject: Re: plpythonu strange syntax error
Date: Fri, 18 Feb 2005 09:24:16 -0500
Message-ID: <17683.1108736656@sss.pgh.pa.us> (raw)
In-Reply-To: <1108725960.4676.18.camel@mickymouse.i.mickymouse.it>
References: <1108719498.4676.14.camel@mickymouse.i.mickymouse.it>
	<20050218095623.GA54765@winnie.fuhr.org>
	<1108725960.4676.18.camel@mickymouse.i.mickymouse.it>

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



view thread (9+ messages)  latest in thread

Message-ID: <17683.1108736656@sss.pgh.pa.us>
Permalink:  ../17683.1108736656@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17683.1108736656@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mickymouse@mickymouse.it, mike@fuhr.org
  Subject: Re: plpythonu strange syntax error
  In-Reply-To: <17683.1108736656@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox