Re: patch: utf8_to_unicode (trivial) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: utf8_to_unicode (trivial)
Date
Msg-id 10951.1281925212@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: utf8_to_unicode (trivial)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: patch: utf8_to_unicode (trivial)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Aug 15, 2010 at 7:49 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> FWIW, I *don't* like this version, specifically because it fails to
>> utilize the pg_wchar datatype. �The function in question is neither big
>> enough nor mutable enough that it's urgent to not duplicate it between
>> the backend and psql, so I don't see much value in moving it to src/port.

> Well, we'd better at least add a comment noting that the two versions
> should match.  But I think it would be better to unify them.  However,
> in the back-branches, I'd just fix the incorrect copy.

Yeah, I did the latter part already because I figured it was
uncontroversial.  What to do in HEAD is still under debate.

As for "the two versions should match", the only way they'd be likely to
diverge would be if the requirements change on one end or the other.
It's not unreasonable to suppose, for example, that we might want the
backend's version to start throwing an elog instead of just returning
-1 for a bad character.  It would be a lot harder to do that if we've
pushed the code into src/port.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)
Next
From: Robert Haas
Date:
Subject: Re: patch: utf8_to_unicode (trivial)