Re: Proof of concept COLLATE support with patch - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Proof of concept COLLATE support with patch
Date
Msg-id 87k6hzzems.fsf@stark.xeocode.com
Whole thread Raw
In response to Proof of concept COLLATE support with patch  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Proof of concept COLLATE support with patch
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PL/pgSQL: EXCEPTION NOSAVEPOINT
Next
From: Tom Lane
Date:
Subject: Re: Question about explain of index scan