Re: Removing SORTFUNC_LT/REVLT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Removing SORTFUNC_LT/REVLT
Дата
Msg-id 12067.1135955928@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Removing SORTFUNC_LT/REVLT  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Removing SORTFUNC_LT/REVLT  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.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


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Removing SORTFUNC_LT/REVLT
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and