Re: Proof of concept COLLATE support with patch

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

> Greg Stark <gsstark@mit.edu> writes:
> > I still doesn't get where the hostility towards this functionality comes from.
> 
> We're not really willing to say "here is a piece of syntax REQUIRED
> BY THE SQL SPEC which we only support on some platforms".  readline,
> O_DIRECT, and the like are a completely inappropriate analogy, because
> those are inherently platform-dependent (and not in the spec).

But that's not the case at all. The syntax can be supported everywhere it
would just be somewhat faster on some platforms than others. It's already
reasonably fast on any platform that caches locale information which includes
glibc and presumably other free software libcs. It would be slightly faster if
there are _l functions. And much slower if the libc setlocale implementation
is braindead. But there's nothing wrong with saying "it's slow because your
libc is slow. Compile with this freely available library which has a better
implementation". The programming syntax would still be exactly 100% the same.

> The objection is fundamentally that a platform-specific implementation
> cannot be our long-term goal, and so expending effort on creating one
> seems like a diversion.  If there were a plan put forward showing how
> this is just a useful way-station, and we could see how we'd later get
> rid of the glibc dependency without throwing away the work already done,
> then it would be a different story.

It's not like the actual calls to setlocale are going to be much code. One day
presumably some variant of these _l functions will become entirely standard.
In which case you're talking about potentially "throwing away" 50 lines of
code. The bulk of the code is going to be parsing and implementing the actual
syntax and behaviour of the SQL spec. And in any case I wouldn't expect it to
ever get thrown away. There will be people compiling on RH9 or similar vintage
systems for a long time.

-- 
greg



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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Locale implementation questions (was: Proof of concept COLLATE support with patch)
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Locale implementation questions (was: Proof of concept COLLATE support with patch)