Re: adding import in pl/python function
От | Claudio Freire |
---|---|
Тема | Re: adding import in pl/python function |
Дата | |
Msg-id | CAGTBQpb=NcXUgF7d4T9TU1GayU0GAOEpPF4e2jDGfPvrV6h=8w@mail.gmail.com обсуждение исходный текст |
Ответ на | adding import in pl/python function (Szymon Guz <mabewlun@gmail.com>) |
Ответы |
Re: adding import in pl/python function
|
Список | pgsql-hackers |
On Fri, May 24, 2013 at 4:10 PM, Szymon Guz <mabewlun@gmail.com> wrote: > > I'm thinking about something else. We could convert it into Decimal > (http://docs.python.org/2/library/decimal.html) class in Python. > Unfortunately this class requires import like `from decimal import Decimal` > from a standard Python library. > > I'm wondering if it would be a good idea to do it like this. It shouldn't > fail even with the trusted version of pl/python, as I'd rather see the > trusted version to allow importing packages from standard library. Why would passing a decimal require an import? The extension itself needs a reference to Decimal, to build them, but the procedure's context doesn't need to have it.
В списке pgsql-hackers по дате отправления: