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

From Tom Lane
Subject Re: plpython function problem workaround
Date
Msg-id 3141.1111124107@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpython function problem workaround  (Michael Fuhr <mike@fuhr.org>)
Responses Re: plpython function problem workaround  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Michael Fuhr <mike@fuhr.org> writes:
> Apparently any CR or LF is considered a line
> ending in an ordinary Python script, with CR and CRLF normalized
> to LF before being passed to the interpreter, so I'm thinking that
> a Python programmer wouldn't expect to be able to embed CRs in a
> string literal and have them remain unchanged.  If that's the case,
> 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.  Unfortunately we are
still left with the issue of having to lex Python programs enough to
know how to indent them ...

            regards, tom lane

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: plpython function problem workaround
Next
From: Michael Fuhr
Date:
Subject: Re: plpython function problem workaround