| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: patch: utf8_to_unicode (trivial) |
| Date: | 2010-08-16 02:35:10 |
| Message-ID: | AANLkTinPJQa3Skt1-onS1WcJqUDMasREKTo4tWZTrkNT@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Aug 15, 2010 at 10:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Sun, Aug 15, 2010 at 7:49 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.
Not really. You'd just write a wrapper to call the version in
src/port and then elog if it returned -1. Unless -1 is actually a
valid result, I guess.
Anyway, it's not really important enough to me to have a protracted
argument about it. Let's wait and see if anyone else has an opinion,
and perhaps a consensus will emerge.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2010-08-16 02:50:24 | Re: refactoring comment.c |
| Previous Message | Tom Lane | 2010-08-16 02:20:12 | Re: patch: utf8_to_unicode (trivial) |