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

From Bruce Momjian
Subject Re: Proof of concept COLLATE support with patch
Date
Msg-id 200606141849.k5EInCC17553@candle.pha.pa.us
Whole thread Raw
In response to Re: Proof of concept COLLATE support with patch  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Thread added to TODO.detail.

---------------------------------------------------------------------------

Greg Stark wrote:
> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 

--  Bruce Momjian   http://candle.pha.pa.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Work-in-progress referential action trigger
Next
From: Bruce Momjian
Date:
Subject: Re: Locale implementation questions