Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aV7fG-0003zA-Ld for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Feb 2016 01:09:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aV7fG-00062V-8P for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Feb 2016 01:09:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aV7fF-0005zD-4y for pgsql-bugs@postgresql.org; Mon, 15 Feb 2016 01:09:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aV7fC-0004Rt-8q for pgsql-bugs@postgresql.org; Mon, 15 Feb 2016 01:09:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1F19DbY004536; Sun, 14 Feb 2016 20:09:13 -0500 From: Tom Lane To: Jim Nasby cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13960: plpython fails with certain function names In-reply-to: <56C12241.2030107@BlueTreble.com> References: <20160215001447.2605.36302@wrigleys.postgresql.org> <3868.1455497399@sss.pgh.pa.us> <56C12241.2030107@BlueTreble.com> Comments: In-reply-to Jim Nasby message dated "Sun, 14 Feb 2016 18:56:33 -0600" Date: Sun, 14 Feb 2016 20:09:13 -0500 Message-ID: <4535.1455498553@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Jim Nasby 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_.) 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