Re: BUG #13960: plpython fails with certain function names

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: BUG #13960: plpython fails with certain function names
Дата
Msg-id 56C53CB1.7070802@BlueTreble.com
обсуждение исходный текст
Ответ на BUG #13960: plpython fails with certain function names  (Jim.Nasby@BlueTreble.com)
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: aparent bug with pgAdmin version 1.22.1 connected to pg 9.5: SQL Pane view of SEQUENCE object
Следующее
От: Artur Zakirov
Дата:
Сообщение: Re: BUG #13964: unexpected result from to_tsvector