Re: plpython function problem workaround - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: plpython function problem workaround
Date
Msg-id 20050317150451.GD2609@svana.org
Whole thread Raw
In response to Re: plpython function problem workaround  (Marco Colombo <pgsql@esiway.net>)
Responses Re: plpython function problem workaround  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, Mar 17, 2005 at 01:03:36PM +0100, Marco Colombo wrote:
> OMG! It's indenting the funtion body. I think you can't do that
> w/o being syntax-aware. I'm not familiar with the code, why is it
> adding a 'def' in front of it at all? I undestand that once you do
> it you'll have to shift the code by an indentation level.

Presumbly because it wants to create a function, which can later be
called. Since python is sensetive to whitespace it has to indent the
code to make it work.

There was an example on the web somewhere (the link has been posted to
this list) of a peice of python which you can load into the interpreter
which will allow it to accept \r\n terminated lines. I don't recall if
anyone actually tried it out or not...

Won't fix the indenting problem though...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Marco Colombo
Date:
Subject: Re: pg_dump large-file support > 16GB
Next
From: Tom Lane
Date:
Subject: Re: pg_dump large-file support > 16GB