Re: prevent encoding conversion recursive error - Mailing list pgsql-patches

From Tom Lane
Subject Re: prevent encoding conversion recursive error
Date
Msg-id 15716.1123166784@sss.pgh.pa.us
Whole thread Raw
In response to prevent encoding conversion recursive error  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-patches
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> As this thread reports (some sever messages are in Chinese):
>     http://archives.postgresql.org/pgsql-bugs/2005-07/msg00247.php
> a SQL grammar error could crash the error stack.

Hmm, I thought we had fixed that years ago.

> To fix this, we just change errmsg() to errmsg_internal() to avoid
> tranlation which could stop the recursion at step 2.

This is a really ugly solution ... and I don't think it solves the
general problem anyway, since this isn't the only possible error message.

I don't seem to have gotten the original problem report, and the archive
page is pretty useless because all the non-ASCII characters have gotten
changed to "?".  Could you post a self-contained example case?  Might be
best to wrap it as a compressed attachment so it doesn't get munged in
transmission.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: prevent encoding conversion recursive error
Next
From: "Magnus Hagander"
Date:
Subject: FW: Win32 unicode vs ICU