postgres.git / summary / log / commit / refs

commit    de479e2ed28925ddd2907cad3e2d5dddd3b97199
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Thu Jul 05 20:40:25 2012 +0000
First released in: 9.3.0, 9.0.9, 9.1.5, 9.2.0

    Revert part of the previous patch that avoided using PLy_elog().
    
    That caused the plpython_unicode regression test to fail on SQL_ASCII
    encoding, as evidenced by the buildfarm. The reason is that with the patch,
    you don't get the detail in the error message that you got before. That
    detail is actually very informative, so rather than just adjust the expected
    output, let's revert that part of the patch for now to make the buildfarm
    green again, and figure out some other way to avoid the recursion of
    PLy_elog() that doesn't lose the detail.


src/pl/plpython/plpy_util.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c index bf2953226f4..4aabafc139f 100644 --- a/src/pl/plpython/plpy_util.c +++ b/src/pl/plpython/plpy_util.c @@ -120,16 +120,7 @@ PLyUnicode_Bytes(PyObject *unicode) rv = PyUnicode_AsEncodedString(unicode, serverenc, "strict"); if (rv == NULL) - { - /* - * Use a plain ereport instead of PLy_elog to avoid recursion, if - * the traceback formatting functions try to do unicode to bytes - * conversion again. - */ - ereport(ERROR, - (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("could not convert Python Unicode object to PostgreSQL server encoding"))); - } + PLy_elog(ERROR, "could not convert Python Unicode object to PostgreSQL server encoding"); return rv; } [parent: b66de4c6d720]