- Notifications
You must be signed in to change notification settings - Fork5
Commit2ce19f8
committed
Make plpython cope with funny characters in function names.
A function name that's double-quoted in SQL can contain almost anycharacters, but we were using that name directly as part of the namegenerated for the Python-level function, and Python doesn't likeanything that isn't pretty much a standard identifier. To fix,replace anything that isn't an ASCII letter or digit with an underscorein the generated name. This doesn't create any risk of duplicate Pythonfunction names because we were already appending the function OID tothe generated name to ensure uniqueness. Per bug #13960 from Jim Nasby.Patch by Jim Nasby, modified a bit by me. Back-patch to allsupported branches.1 parent6ce8236 commit2ce19f8
File tree
3 files changed
+17
-7
lines changed- src/pl/plpython
- expected
- sql
3 files changed
+17
-7
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
| 19 | + | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
31 |
| - | |
| 30 | + | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| 150 | + | |
150 | 151 |
| |
151 | 152 |
| |
152 | 153 |
| |
| |||
156 | 157 |
| |
157 | 158 |
| |
158 | 159 |
| |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
159 | 169 |
| |
160 | 170 |
| |
161 | 171 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
| 14 | + | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
| 26 | + | |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
|
0 commit comments
Comments
(0)