Re: plpython improvements
От | Sven Suursoho |
---|---|
Тема | Re: plpython improvements |
Дата | |
Msg-id | op.s808yazgplgmb3@localhost обсуждение исходный текст |
Ответ на | Re: plpython improvements (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: plpython improvements
|
Список | pgsql-patches |
Hi, Sun, 30 Apr 2006 19:14:28 +0300, Tom Lane <tgl@sss.pgh.pa.us>: > "Sven Suursoho" <sven@spam.pri.ee> writes: >> Unfortunately, there is still one problem when using unpatched python, >> caused by too aggressive assert. >> http://mail.python.org/pipermail/python-checkins/2005-August/046571.html. > > I don't think we are going to be able to accept a patch that causes the > server to crash when using any but a bleeding-edge copy of Python. Did complete rewrite for SETOF functions: now accepts any python object for which iter(object) returns iterable object. In this way we don't have to deal with specific containers but can use unified python iterator API. It means that plpython is future-proof -- whenever python introduces new container, stored procedures already can use those without recompiling language handler. Also integrated with regression tests and updated existing tests to use named parameters. When using python interpreter with asserts enabled, generators still crash. But I don't think that we should drop this feature because of that. Reasons: 1) this is someone else's bug, we are using documented API correctly 2) it doesn't concern majority of users because probably there is no asserts in production packages (tested with gentoo, ubuntu, suse). This is true even for older python versions that are not patched. And after all, we can document using sets, lists, tuples, iterators etc and explicitly state that returning generator is undefined. -- Sven Suursoho
Вложения
В списке pgsql-patches по дате отправления: