Tom Lane wrote:
BTW, I notice that the code allows CSV escape and quote characters that
have the high bit set (in single-byte server encodings that is).  Is
this a good idea?  It seems like such are extremely unlikely to be the
same in two different encodings.  Maybe we should restrict to the ASCII
range?  Especially if the client encoding is multibyte ...

At least many of the ISO-8859-* encodings have many common non-ascii characters, and there's no problem if the client_ and server_encodings match. But it does seem risky to allow it if we can't detect and throw an error on the non-safe cases. Perhaps we could translate the chars from client to server encoding?

If the client encoding is a multibyte one, then we certainly should elog(ERROR) if you try to do that.

Though from a practical point of view, I doubt anyone would mind if we just always restricted them to ASCII range...

  Heikki Linnakangas

Sent via pgsql-patches mailing list (
To make changes to your subscription:

Reply via email to