diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-07-05 21:45:24 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-07-05 22:31:29 +0300 |
commit | b66de4c6d7208d9ec420b912758377a3533c7a7d (patch) | |
tree | 927bd3aa8f9e249aeed4344d8929cb09e300d667 /src/backend/utils/adt/arrayutils.c | |
parent | fc548b2296df3fe039bf68e196bfd883338e0faa (diff) | |
download | postgresql-b66de4c6d7208d9ec420b912758377a3533c7a7d.tar.gz postgresql-b66de4c6d7208d9ec420b912758377a3533c7a7d.zip |
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 fails
for some reason, use a plain ereport(), not a PLy_elog(), to report that
error. That avoids recursion and crash, if PLy_elog() tries to call
PLyUnicode_Bytes() again.
This fixes bug reported by Asif Naeem. Backpatch down to 9.0, before that
plpython didn't even try these conversions.
Jan UrbaĆski, with minor comment improvements by me.
Diffstat (limited to 'src/backend/utils/adt/arrayutils.c')
0 files changed, 0 insertions, 0 deletions