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?



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to