Re: patch: utf8_to_unicode (trivial)

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 01:13:46
Message-ID: AANLkTimpdQowGULKmZAAV2BPaOzLUpqPDzoBY4NuzkKU@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 15, 2010 at 7:49 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com> writes:
>> I've attached another patch that moves utf8_to_unicode to src/port per
>> Robert Haas's suggestion.
>
>> This patch itself is not quite as elegant as the first one because it
>> puts platform-independent code that "belongs" in wchar.c into src/port
>> .  It also uses unsigned int instead of pg_wchar because the typedef
>> of pg_wchar isn't available to the frontend, if I'm not mistaken.
>
>> I'm not sure whether I like the old patch better or the new one.
>
> 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.

YMMV.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-16 01:25:54 Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)
Previous Message Robert Haas 2010-08-16 01:11:10 Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)