Patch (was: tough locale bug)

From: Goran Thyni <goran(at)kirra(dot)net>
To: PostgreSQL Hackers <hackers(at)postgreSQL(dot)org>, pgsql-paches(at)postgreSQL(dot)org
Subject: Patch (was: tough locale bug)
Date: 1999-01-31 15:52:39
Message-ID: 36B47C47.86D4CCAC@kirra.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Goran Thyni wrote:
> 3. text_lt('G','G\0xFF') this is not correct!
>
> Case 3 work not work with strcoll(), in varstr_cmp().
> If I change it to strcoll() to strncmp() it works as expected,
> but it probably breaks sorting etc big time.

Here is a hack which solves the problem without breaking sorting AFAIK.
I have read a lot of code, but has not found any cleaner way to fix
this.
A cleaner solution would be to find the highest char in locale charset
but I found no portable way to do that, any pointers appriciated.

It is not a beauty but it works.
Please apply to -current since it fixes the bug,
unless someone has a better suggestion.

best regards,
--
-----------------
Göran Thyni
This is Penguin Country. On a quiet night you can hear Windows NT
reboot!

Attachment Content-Type Size
pg.diff text/plain 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-01-31 17:21:40 Re: [HACKERS] Re: vacuumdb?
Previous Message D'Arcy J.M. Cain 1999-01-31 13:18:39 Re: [HACKERS] Patches