forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit138313e
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 parentb8aca12 commit138313e
1 file changed
+62
-7
lines changedLines changed: 62 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4873 | 4873 |
| |
4874 | 4874 |
| |
4875 | 4875 |
| |
4876 |
| - | |
4877 |
| - | |
| 4876 | + | |
4878 | 4877 |
| |
4879 |
| - | |
4880 |
| - | |
4881 |
| - | |
4882 |
| - | |
| 4878 | + | |
| 4879 | + | |
| 4880 | + | |
| 4881 | + | |
| 4882 | + | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
| 4889 | + | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| 4898 | + | |
| 4899 | + | |
| 4900 | + | |
| 4901 | + | |
| 4902 | + | |
| 4903 | + | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
4883 | 4929 |
| |
4884 | 4930 |
| |
4885 |
| - | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
4886 | 4941 |
| |
4887 | 4942 |
| |
4888 | 4943 |
| |
|
0 commit comments
Comments
(0)