Jim Nasby <Jim.Nasby@bluetreble.com> writes:
> On 2/14/16 6:49 PM, Tom Lane wrote:
>> No, because then you would get collisions, ie function names that look
>> different to PG would look the same to python. Bad news.
> IIRC we append the regproc OID to ensure it's unique.
Ah, okay, problem solved.
>> (Actually, don't we have that issue anyway because of schemas? I wonder
>> why we are exposing the PG name of the function to python at all.)
> Not sure. Maybe useful in a call stack inside python? I can't really
> think of what else you'd use it for. (I assume you're suggesting just
> call the function names something like plpython_<regproc::oid>.)
Yeah, that's what I was thinking about. But yes, if we append the OID
anyway then we might as well just strip all non-alphanumeric chars
from the name. Safe and you still get some debuggability.
regards, tom lane