Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem

Поиск
Список
Период
Сортировка
От Goran Thyni
Тема Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem
Дата
Msg-id 375EC369.783E6623@kirra.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
It was me who found the bug and supplied the ugly fix, but that was the
only
quick fix we could find until someone figure out how to get the correct
one from
locale.
USE_LOCALE uses strcoll instead of strcmp for comparasion and indexes
and it sorts
correctly but does not work with the MakeIndexable trick since \377
might not
be the highest char in the alphabet or worse might not be a char of the
alphabet at
all (like in sv/fi locales).

The patch gives a slower correct result instead of a fast incorrect one,
which is better IMHO, but maybe I am old fashion. :-)

Anyway I think a correct solution should be:
"a LIKE 'abc%'" should generate:
"a >= 'abc\0' AND a < 'abd'"                        ^
where d is the last char before % + 1, or more correct the next char in
alphabet
after the last char before %.

Still looking for a locale guru. Hello!! :-(

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: [HACKERS] PL/Lang (was: Priorities for 6.6)
Следующее
От: Massimo Dal Zotto
Дата:
Сообщение: out of memory with large queries