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

From Michael Fuhr
Subject Re: plpython function problem workaround
Date
Msg-id 20050318072133.GA26419@winnie.fuhr.org
Whole thread Raw
In response to Re: plpython function problem workaround  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plpython function problem workaround
List pgsql-general
On Fri, Mar 18, 2005 at 12:35:07AM -0500, Tom Lane wrote:
> Michael Fuhr <mike@fuhr.org> writes:
> > then concerns about CR conversions potentially messing up a user's
> > strings might be unfounded.
>
> Yeah, it looks like you are right:
>
> http://cvs.sourceforge.net/viewcvs.py/python/python/nondist/peps/pep-0278.txt?rev=1.2
>
> So that part of it can be solved fairly easily.

Should I submit a patch?  It should be only a few additional lines
in PLy_procedure_munge_source().  Would you apply it only to HEAD,
or would it be considered a bug fix that REL8_0_STABLE could get
as well?  It might be nice to have it in 8.0.2, whenever that comes
out.

> Unfortunately we are still left with the issue of having to lex
> Python programs enough to know how to indent them ...

Yeah, that one's a little extra work, but I don't think anybody's
complained about it yet.  So far I'm thinking it only affects
multi-line strings as in the example I posted, and even then it might
not matter unless you use that string as a column value or return it
to the caller.  If you're doing something else like building a query
statement, then the bogus indentation is probably irrelevant.  It
ought to be fixed, but it doesn't seem to be squeaking very loudly.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpython function problem workaround
Next
From: Rafael Martinez
Date:
Subject: Re: pg_dump large-file support > 16GB