pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pedro Gimeno <parigalo@formauri.es>
To: 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: Thu, 18 Feb 2016 03:36:28 +0100
Message-ID: <56C52E2C.3000602@formauri.es> (raw)
In-Reply-To: <25529.1455673778@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>
	<56C3CB9A.4030009@BlueTreble.com>
	<25529.1455673778@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (10+ messages)  latest in thread

Message-ID: <56C52E2C.3000602@formauri.es>
Permalink:  ../56C52E2C.3000602@formauri.es/
Also on:    postgresql.org/message-id/56C52E2C.3000602@formauri.es

 · 

reply

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: parigalo@formauri.es, tgl@sss.pgh.pa.us, Jim.Nasby@bluetreble.com
  Subject: Re: BUG #13960: plpython fails with certain function names
  In-Reply-To: <56C52E2C.3000602@formauri.es>
  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> <56C52E2C.3000602@formauri.es>

* 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