From: | Szymon Guz <mabewlun(at)gmail(dot)com> |
---|---|
To: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: adding import in pl/python function |
Date: | 2013-05-24 19:22:08 |
Message-ID: | CAFjNrYvzrvDyF5RRYU1Y1mf_5ah5=MS7Kp0MasAPFgGpMGMAWg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 May 2013 21:14, Claudio Freire <klaussfreire(at)gmail(dot)com> wrote:
> On Fri, May 24, 2013 at 4:10 PM, Szymon Guz <mabewlun(at)gmail(dot)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.
>
Hm... maybe you're right. I think I don't understand fully how the
procedures are executed, and I need to read more to get it.
thanks,
Szymon
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-05-24 19:26:19 | Re: visibilitymap_set and checksums |
Previous Message | Alvaro Herrera | 2013-05-24 19:20:34 | shmem startup and shutdown hooks |