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.