From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hannu Krosing <hannu(at)2ndQuadrant(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: multiple CREATE FUNCTION AS items for PLs |
Date: | 2012-12-16 18:37:04 |
Message-ID: | 17743.1355683024@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hannu Krosing <hannu(at)2ndQuadrant(dot)com> writes:
> On further thought the function name should just be what it is defined
> in postgresql, like this
> CREATE FUNCTION foo(a,b,c) AS $$
> import x
> from __future__ import nex_cool_feature
> def helper_function(x):
> ...
> def foo(a,b,c):
> defined function body here
> def bar(i,j):
> function body for bar(i,j)
> $$ language plpythonu;
>> but this would not be backwards compatible, at least not in any
>> obvious way.
> This is still unfortunately true :(
Could we say that *if* the function text contains a line beginning
"def function_name" then we interpret it as above, otherwise oldstyle?
I'm not sure how big a risk of false positives there'd be.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-12-16 18:44:20 | Re: multiple CREATE FUNCTION AS items for PLs |
Previous Message | Hannu Krosing | 2012-12-16 18:31:12 | Re: multiple CREATE FUNCTION AS items for PLs |