aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-07-05 21:45:24 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-07-05 22:31:47 +0300
commit773288016d00bd72e8e2bcb5b1eec67abb2d9e00 (patch)
tree11de66da62a215d726e0498b38d84edf8e426eee /src/tutorial/funcs.c
parent071589cb3f6b4e259d3b87f228fd1c69b8189037 (diff)
downloadpostgresql-773288016d00bd72e8e2bcb5b1eec67abb2d9e00.tar.gz
postgresql-773288016d00bd72e8e2bcb5b1eec67abb2d9e00.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/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions