- Notifications
You must be signed in to change notification settings - Fork28
Commitb66de4c
committed
Fix mapping of PostgreSQL encodings to Python encodings.
Windows encodings, "win1252" and so forth, are named differently in Python,like "cp1252". Also, if the PyUnicode_AsEncodedString() function call failsfor some reason, use a plain ereport(), not a PLy_elog(), to report thaterror. That avoids recursion and crash, if PLy_elog() tries to callPLyUnicode_Bytes() again.This fixes bug reported by Asif Naeem. Backpatch down to 9.0, before thatplpython didn't even try these conversions.Jan Urbański, with minor comment improvements by me.1 parentfc548b2 commitb66de4c
1 file changed
+62
-7
lines changedLines changed: 62 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 |
| - | |
69 |
| - | |
| 68 | + | |
70 | 69 |
| |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
75 | 121 |
| |
76 | 122 |
| |
77 |
| - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
78 | 133 |
| |
79 | 134 |
| |
80 | 135 |
| |
|
0 commit comments
Comments
(0)