On 2/17/16 8:36 PM, Pedro Gimeno wrote:
> 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.
Postgres prefaces the name of the python function with a fixed string,
so it will never start with a digit.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com