http://archives.postgresql.org/pgsql-general/2005-01/msg00792.php
The problem appears to be that things are working as documented in PEP-278:
There is no support for universal newlines in strings passed to eval() or exec. It is envisioned that such strings always have the standard \n line feed, if the strings come from a file that file can be read with universal newlines.
So what happens is that if a Windows or Mac user tries to create a Python stored procedure, it will go through to the server with Windows line endings and the embedded Python interpreter will raise a syntax error for everything except single line functions.
I don't think it is possible for plpythonu to fix this by simply translating the line endings, as this would require significant knowledge of Python syntax to do correctly (triple quoted strings and character escaping I think).
The timing of this thread is very unfortunate, as PostgreSQL 8.0 is being released this weekend and the (hopefully) last release of the 2.3 series next week :-(
-- Stuart Bishop <[EMAIL PROTECTED]> http://www.stuartbishop.net/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com