X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9AE358B9B6C for ; Fri, 18 Feb 2005 14:24:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21086-06 for ; Fri, 18 Feb 2005 14:24:19 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id BB66A8BA46C for ; Fri, 18 Feb 2005 14:24:22 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1IEOHtp017684; Fri, 18 Feb 2005 09:24:17 -0500 (EST) To: Michele Bendazzoli Cc: Michael Fuhr , pgsql Subject: Re: plpythonu strange syntax error 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> Comments: In-reply-to Michele Bendazzoli message dated "Fri, 18 Feb 2005 12:26:00 +0100" Date: Fri, 18 Feb 2005 09:24:16 -0500 Message-ID: <17683.1108736656@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/68 X-Sequence-Number: 5313 Michele Bendazzoli 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