| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Marco Colombo <pgsql(at)esiway(dot)net>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: plpython function problem workaround |
| Date: | 2005-03-18 07:21:33 |
| Message-ID: | 20050318072133.GA26419@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Mar 18, 2005 at 12:35:07AM -0500, Tom Lane wrote:
> Michael Fuhr <mike(at)fuhr(dot)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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rafael Martinez | 2005-03-18 08:32:36 | Re: pg_dump large-file support > 16GB |
| Previous Message | Tom Lane | 2005-03-18 05:35:07 | Re: plpython function problem workaround |