mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-07 09:57:39 +08:00
Mimic the Python interpreter's own logic for printing exceptions instead
of just using the straight str() call, so that
you get
plpy.SPIError
instead of
<class 'plpy.SPIError'>
and for built-in exceptions merely
UnicodeEncodeError
Besides looking better this cuts down on the endless version differences
in the regression test expected files.
Guide to alternative expected files: plpython_unicode.out any version, when server encoding != SQL_ASCII and client encoding = UTF8; else ... plpython_unicode_0.out any version, when server encoding != SQL_ASCII and client encoding != UTF8; else ... plpython_unicode_2.out Python 2.2 plpython_unicode_3.out Python 2.3, 2.4, 2.5, 2.6 plpython_types_3.out Python 3.1