From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13960: plpython fails with certain function names
Date: Sun, 14 Feb 2016 20:09:13 -0500
Message-ID: <4535.1455498553@sss.pgh.pa.us> (raw)
In-Reply-To: <56C12241.2030107@BlueTreble.com>
References: <20160215001447.2605.36302@wrigleys.postgresql.org>
<3868.1455497399@sss.pgh.pa.us>
<56C12241.2030107@BlueTreble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, Jim.Nasby@bluetreble.com
Subject: Re: BUG #13960: plpython fails with certain function names
In-Reply-To: <4535.1455498553@sss.pgh.pa.us>
References: <20160215001447.2605.36302@wrigleys.postgresql.org> <3868.1455497399@sss.pgh.pa.us> <56C12241.2030107@BlueTreble.com> <4535.1455498553@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox