Re: Bug #728: Interactions between bytea and character encoding

From: Joe Conway <mail(at)joeconway(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Anders Hammarquist <iko(at)strakt(dot)com>, pgsql-bugs(at)postgresql(dot)org, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Subject: Re: Bug #728: Interactions between bytea and character encoding
Date: 2002-08-14 05:05:05
Message-ID: 3D59E501.7000704@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian wrote:
> I am hoping for a patch for this for 7.3. Added to open items:
>
> Fix bytea to not encode input string
>

I said:
> Here's the remaining issue that I remembered; see:
> http://archives.postgresql.org/pgsql-hackers/2002-04/msg00256.php
>
> The gist of this is that when client and server encoding don't match,
> pg_do_encoding_conversion() gets called, regardless of data type.
> This is the *wrong thing* to do for BYTEA data, I think. Fixing this,
> combined with the UNKNOWNIN/OUT fix we did earlier, should eliminate
> the need to escape the high bit characters when inputting bytea. The
> only characters which *should* need to be escaped are the ones
> originally escaped by PQescapeBytea. IMHO of course ;-)

Tatsuo or Tom can answer this better than me, but I don't think this can
be fixed without a fe/be protocol change, so I'd guess it's a
7.4 issue. But, if there is a way to do it now, and someone gives me a
clue how to proceed, I'll try to get a patch together.

Joe

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-08-14 05:07:37 Re: mistakes in postgresql-snapshots (7.3)
Previous Message Bruce Momjian 2002-08-14 04:56:34 Re: Bug #728: Interactions between bytea and character encoding