Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On Thu, Dec 29, 2005 at 10:49:23AM -0500, Tom Lane wrote:
>> What I'd really like is to deprecate the "USING operator" syntax in
>> favor of a "USING operatorclassname" syntax. Actually, "USING opclass
>> [ASC/DESC]" would get the job done, since given an opclass you can
>> certainly run the sort function either normal or reverse.
> Thought of something this morning: this seems OK at first glance but I
> don't think it's workable. The example being locale dependant sorting.
> I really don't think we want to create a new operator class for each
> possible way you can sort strings.
Well, you would need to add a COLLATE layer on top of this in just the
same way as you'd need a COLLATE layer now if you want locale-dependent
sorting. I didn't claim it handled that; just pointing out that COLLATE
doesn't handle this, either.
> Collations (currently anyway) are really just an operator class +
> [ASC/DESC] + optional locale rolled into a single identifier.
I really need to study your mail from the other day, but unfortunately
other pressures will probably keep me from getting to it today :-(.
One comment though --- it's not really sane to include ASC/DESC in there
is it? I thought the spec wanted ORDER BY foo COLLATE bar [ASC/DESC]
... or if not, users certainly will. If every single collation has to
be created in a matched ASC/DESC pair, you've done it wrong.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2005-12-30 16:49:59|
|Subject: Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and|
|Previous:||From: Martijn van Oosterhout||Date: 2005-12-30 15:07:25|
|Subject: Re: Removing SORTFUNC_LT/REVLT|