pgsql: Improved printing of Python exceptions in PL/Python Mimic the

Поиск
Список
Период
Сортировка
От petere@postgresql.org (Peter Eisentraut)
Тема pgsql: Improved printing of Python exceptions in PL/Python Mimic the
Дата
Msg-id 20100116110351.AF02A7541B9@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Improved printing of Python exceptions in PL/Python

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.

Modified Files:
--------------
    pgsql/src/pl/plpython:
        plpython.c (r1.134 -> r1.135)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/plpython.c?r1=1.134&r2=1.135)
    pgsql/src/pl/plpython/expected:
        README (r1.5 -> r1.6)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/README?r1=1.5&r2=1.6)
        plpython_error.out (r1.8 -> r1.9)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_error.out?r1=1.8&r2=1.9)
        plpython_unicode_2.out (r1.4 -> r1.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_unicode_2.out?r1=1.4&r2=1.5)
        plpython_unicode_3.out (r1.4 -> r1.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_unicode_3.out?r1=1.4&r2=1.5)

Removed Files:
-------------
    pgsql/src/pl/plpython/expected:
        plpython_error_2.out
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_error_2.out)
        plpython_unicode_5.out
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_unicode_5.out)

В списке pgsql-committers по дате отправления:

Предыдущее
От: sriggs@postgresql.org (Simon Riggs)
Дата:
Сообщение: pgsql: Message mentions msec when it should be seconds, so use s instead
Следующее
От: mha@postgresql.org (Magnus Hagander)
Дата:
Сообщение: pgsql: Build the walreceiver library on MSVC as well.