forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2956745
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 parent5b214b4 commit2956745
1 file changed
+62
-7
lines changedLines changed: 62 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3690 | 3690 |
| |
3691 | 3691 |
| |
3692 | 3692 |
| |
3693 |
| - | |
3694 |
| - | |
| 3693 | + | |
3695 | 3694 |
| |
3696 |
| - | |
3697 |
| - | |
3698 |
| - | |
3699 |
| - | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
3700 | 3746 |
| |
3701 | 3747 |
| |
3702 |
| - | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
3703 | 3758 |
| |
3704 | 3759 |
| |
3705 | 3760 |
| |
|
0 commit comments
Comments
(0)