Re: Proof of concept COLLATE support with patch

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Proof of concept COLLATE support with patch
Дата
Msg-id 87k6hzzems.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Proof of concept COLLATE support with patch  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Proof of concept COLLATE support with patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> Supports any glibc platform and possibly Win32.
> 
> Adds:
>   SELECT ... ORDER BY expr COLLATE 'locale'
>   CREATE INDEX locale_index ON table(expr COLLATE 'locale')
>   Index scan used when COLLATE order permits
> 
> This is just a proof of concept patch. I didn't send it to -patches
> because as Tom pointed out, there's no hope of it getting in due to
> platform dependant behaviour.
> 
> This patch does not use setlocale and is completely orthoganal to any
> locale support already in the backend.

I still doesn't get where the hostility towards this functionality comes from.
Just because some platforms provide a better interface than others doesn't
mean Postgres shouldn't do the best it can with what's available.

If there were an autoconf test for the *_l functions and a failover to calling
setlocale (safely protected) then it's just an issue that the feature will be
faster on some platforms than others. It'll still be the same behaviour on all
platforms. So there's no actual platform dependent Postgres behaviour. 

Should readline support be ripped out because not every platform will have
readline? Or O_DIRECT support? Or unix domain socket support?

-- 
greg



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: PL/pgSQL: EXCEPTION NOSAVEPOINT
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Question about explain of index scan