From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Pedro Gimeno <parigalo(at)formauri(dot)es>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13960: plpython fails with certain function names |
Date: | 2016-02-18 03:38:25 |
Message-ID: | 56C53CB1.7070802@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Artur Zakirov | 2016-02-18 10:53:43 | Re: BUG #13964: unexpected result from to_tsvector |
Previous Message | Bruce Momjian | 2016-02-18 03:01:56 | Re: aparent bug with pgAdmin version 1.22.1 connected to pg 9.5: SQL Pane view of SEQUENCE object |