postgresql/src/pl/plpython/expected
Heikki Linnakangas 3ff15883b1 Perform conversion from Python unicode to string/bytes object via UTF-8.
We used to convert the unicode object directly to a string in the server
encoding by calling Python's PyUnicode_AsEncodedString function. In other
words, we used Python's routines to do the encoding. However, that has a
few problems. First of all, it required keeping a mapping table of Python
encoding names and PostgreSQL encodings. But the real killer was that Python
doesn't support EUC_TW and MULE_INTERNAL encodings at all.

Instead, convert the Python unicode object to UTF-8, and use PostgreSQL's
encoding conversion functions to convert from UTF-8 to server encoding. We
were already doing the same in the other direction in PLyUnicode_FromString,
so this is more consistent, too.

Note: This makes SQL_ASCII to behave more leniently. We used to map
SQL_ASCII to Python's 'ascii', which on Python means strict 7-bit ASCII
only, so you got an error if the python string contained anything but pure
ASCII. You no longer get an error; you get the UTF-8 representation of the
string instead.

Backpatch to 9.0, where these conversions were introduced.

Jan Urbański
2012-08-06 14:09:50 +03:00
..
plpython_composite.out Table function support for PL/Python 2011-02-26 16:53:11 +02:00
plpython_do.out PL/Python: Improve test coverage 2012-05-02 21:09:03 +03:00
plpython_drop.out Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpython_error.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_error_0.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_global.out Make PL/Python tests more compatible with Python 3 2009-08-24 20:25:25 +00:00
plpython_import.out PL/Python: Adjust the regression tests for Python 3.3 2012-05-11 23:04:47 +03:00
plpython_newline.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
plpython_params.out PL/Python: Adjust the regression tests for Python 3.3 2012-05-11 23:04:47 +03:00
plpython_populate.out Convert the existing regression test scripts for the various optional 2005-05-14 17:55:22 +00:00
plpython_quote.out Add PL/Python functions for quoting strings 2011-02-22 23:41:23 +02:00
plpython_record.out PL/Python: Accept strings in functions returning composite types 2012-04-26 21:03:48 +03:00
plpython_schema.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_setof.out PL/Python: Fix crash in functions returning SETOF and using SPI 2012-05-02 20:59:51 +03:00
plpython_spi.out PL/Python: Fix slicing support for result objects for Python 3 2012-05-10 20:40:30 +03:00
plpython_subtransaction.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_subtransaction_0.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_subtransaction_5.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_test.out plpython: Add SPI cursor support 2011-12-05 19:52:15 +02:00
plpython_trigger.out PL/Python: Adjust the regression tests for Python 3.3 2012-05-11 23:04:47 +03:00
plpython_types.out Add traceback information to PL/Python errors 2011-04-06 22:36:06 +03:00
plpython_types_3.out Add traceback information to PL/Python errors 2011-04-06 22:36:06 +03:00
plpython_unicode.out Set client encoding explicitly in plpython_unicode test 2011-04-16 21:53:43 +03:00
plpython_void.out Enhanced error context support in PL/Python 2009-08-25 12:44:59 +00:00
README Python 2.2 is no longer supported 2012-05-10 20:02:57 +03:00

Guide to alternative expected files:

plpython_error_0.out			Python 2.4 and older

plpython_unicode.out			server encoding != SQL_ASCII
plpython_unicode_3.out			server encoding == SQL_ASCII

plpython_subtransaction_0.out	Python 2.4 and older (without with statement)
plpython_subtransaction_5.out	Python 2.5 (without with statement)

plpython_types_3.out			Python 3.x