Re: Multiline plpython procedure

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Multiline plpython procedure
Дата
Msg-id 20050119040136.GA56212@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Multiline plpython procedure  (Adrian Klaver <aklaver@comcast.net>)
Ответы Re: Multiline plpython procedure  (Stuart Bishop <stuart@stuartbishop.net>)
Список pgsql-general
On Tue, Jan 18, 2005 at 07:34:59PM -0800, Adrian Klaver wrote:

> Actually universal newline support seems to be covered by the following PEP
> and is present in the version of Python(2.3) I am running.
> http://www.python.org/peps/pep-0278.txt

I see the following in the PEP:

  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.

Does the above mean that the PyRun_*() family doesn't have universal
newline support?  Or at least that some members of the family don't?
That would explain why the simple C program I tested failed.

http://archives.postgresql.org/pgsql-general/2005-01/msg00876.php

> I would tend to agree with Hong Yuan that the problem exists in plpythonu's
> handling of newlines.

If Python's behavior is intentional then the newline burden would
seem to be on the user or on plpythonu.  I think Tom's point is
that that's just silly....

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

В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Smith
Дата:
Сообщение: Re: Easy transaction question
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Index optimization ?