Re: plpython function problem workaround

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: plpython function problem workaround
Дата
Msg-id 20050317150451.GD2609@svana.org
обсуждение исходный текст
Ответ на Re: plpython function problem workaround  (Marco Colombo <pgsql@esiway.net>)
Ответы Re: plpython function problem workaround  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Mar 17, 2005 at 01:03:36PM +0100, Marco Colombo wrote:
> OMG! It's indenting the funtion body. I think you can't do that
> w/o being syntax-aware. I'm not familiar with the code, why is it
> adding a 'def' in front of it at all? I undestand that once you do
> it you'll have to shift the code by an indentation level.

Presumbly because it wants to create a function, which can later be
called. Since python is sensetive to whitespace it has to indent the
code to make it work.

There was an example on the web somewhere (the link has been posted to
this list) of a peice of python which you can load into the interpreter
which will allow it to accept \r\n terminated lines. I don't recall if
anyone actually tried it out or not...

Won't fix the indenting problem though...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Marco Colombo
Дата:
Сообщение: Re: pg_dump large-file support > 16GB
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump large-file support > 16GB