Re: multiple CREATE FUNCTION AS items for PLs
От | Peter Eisentraut |
---|---|
Тема | Re: multiple CREATE FUNCTION AS items for PLs |
Дата | |
Msg-id | 1355693019.4311.16.camel@vanquo.pezone.net обсуждение исходный текст |
Ответ на | Re: multiple CREATE FUNCTION AS items for PLs (Hannu Krosing <hannu@krosing.net>) |
Ответы |
Re: multiple CREATE FUNCTION AS items for PLs
|
Список | 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?
В списке pgsql-hackers по дате отправления: