From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Hannu Krosing <hannu(at)krosing(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: multiple CREATE FUNCTION AS items for PLs |
Date: | 2012-12-16 21:23:39 |
Message-ID: | 1355693019.4311.16.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2012-12-16 at 19:13 +0100, Hannu Krosing wrote:
> As an idea seems quite good, but maybe the "run once" part could use
> its
> own keyword in the future, something like PREPARE or REQUIRE?
Well, either we do it in a language independent way, in which case this
would be too prescriptive, or we do it in a Python-specific way (less
likely), but "prepare" or "require" are not Python concepts.
> WHile at it, why not also fix the functions to be real function
> _with_ _real_ _arguments_ , not arguments-passed-in-as-globals
>
> and at least we could call this function with its real name inside its
> own module
> (stored global namespace) so we could easily do recursion
>
> CREATE FUNCTION factorial(n bigint) returns bigint LANGUAGE plpythonu
> AS $$
> if n==0: return 1
> return factorial(n-1) * n
> $$;
>
These are also good things to fix, but are they related? Could they not
be fixed independently?
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2012-12-16 21:25:06 | Re: WIP: index support for regexp search |
Previous Message | Hannu Krosing | 2012-12-16 20:22:30 | Re: multiple CREATE FUNCTION AS items for PLs |