Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWRPJ-0006XQ-Af for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2016 16:26:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWRPI-0000ow-Sd for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2016 16:26:20 +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 1aWESJ-0007AH-ID for pgsql-bugs@postgresql.org; Thu, 18 Feb 2016 02:36:35 +0000 Received: from formauri.es ([78.47.205.180]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aWESG-000189-Mt for pgsql-bugs@postgresql.org; Thu, 18 Feb 2016 02:36:34 +0000 Received: from [0.0.0.0] (formauri.es [78.47.205.180]) by formauri.es (Postfix) with ESMTPS id ABAE4802C1; Thu, 18 Feb 2016 03:36:29 +0100 (CET) Message-ID: <56C52E2C.3000602@formauri.es> Date: Thu, 18 Feb 2016 03:36:28 +0100 From: Pedro Gimeno User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.7.0 MIME-Version: 1.0 To: Tom Lane , Jim Nasby CC: pgsql-bugs@postgresql.org Subject: Re: BUG #13960: plpython fails with certain function names References: <20160215001447.2605.36302@wrigleys.postgresql.org> <3868.1455497399@sss.pgh.pa.us> <56C12241.2030107@BlueTreble.com> <4535.1455498553@sss.pgh.pa.us> <56C3CB9A.4030009@BlueTreble.com> <25529.1455673778@sss.pgh.pa.us> In-Reply-To: <25529.1455673778@sss.pgh.pa.us> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Tom Lane wrote, On 2016-02-17 02:49: > + /* Replace any not-legal-in-Python-names characters with '_' */ > + for (ptr = procName; *ptr; ptr++) > + { > + if (!((*ptr >= 'A' && *ptr <= 'Z') || > + (*ptr >= 'a' && *ptr <= 'z') || > + (*ptr >= '0' && *ptr <= '9'))) > + *ptr = '_'; > + } > + That may blow on names that start with a digit. Maybe + (*ptr >= '0' && *ptr <= '9' && ptr != procName))) Making the testcase start with a digit sounds like a good idea. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs