unknownin/out patch (was [HACKERS] PQescapeBytea is not multibyte aware)

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, Thomas Lockhart <lockhart(at)fourpalms(dot)org>
Subject: unknownin/out patch (was [HACKERS] PQescapeBytea is not multibyte aware)
Date: 2002-04-07 23:18:57
Message-ID: 3CB0D3E1.4010508@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>
>>I think you're correct that in a client/database encoding mismatch
>>scenario, there would be bigger problems. Thoughts on this?
>
>
> This scenario is probably why Tatsuo wants PQescapeBytea to octalize
> everything with the high bit set; I'm not sure there's any lesser way
> out. Nonetheless, if UNKNOWN conversion introduces additional failures
> then it makes sense to fix that.
>
> regards, tom lane
>

Here's a patch to add unknownin/unknownout support. I also poked around
looking for places that assume UNKNOWN == TEXT. One of those was the
"SET" type in pg_type.h, which was using textin/textout. This one I took
care of in this patch. The other suspicious place was in
string_to_dataum (which is defined in both selfuncs.c and indxpath.c). I
wasn't too sure about those, so I left them be.

Regression tests all pass with the exception of horology, which also
fails on CVS tip. It looks like that is a daylight savings time issue
though.

Also as a side note, I can't get make check to get past initdb if I
configure with --enable-multibyte on CVS tip. Is there a known problem
or am I just being clueless . . .wait, let's qualify that -- am I being
clueless on this one issue? ;-)

Joe

Attachment Content-Type Size
unk.r0.patch text/plain 6.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-04-07 23:27:52 Re: timeout implementation issues
Previous Message Neil Conway 2002-04-07 19:08:44 Re: Indexing and regular expressions

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-04-08 02:43:20 Re: unknownin/out patch (was [HACKERS] PQescapeBytea is
Previous Message Tom Lane 2002-04-07 17:10:53 Re: PQescapeBytea is not multibyte aware