Does anybody use ORDER BY x USING y?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Does anybody use ORDER BY x USING y?
Дата
Msg-id 20050918172036.GC31394@svana.org
обсуждение исходный текст
Ответы Re: Does anybody use ORDER BY x USING y?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Hi,

PostgreSQL's grammer allows you to specify the operator to sort with in
the ORDER BY clause. Various bits of the backend support this feature,
yet it appears to partially undocumented. I can't find it in the ORDER
BY [1] section but there is a paragraph on it under the SELECT
documentation [2].

I'm asking because SQL COLLATE support is really doing something
similar. I was wondering if instead of adding something in parallel just
replace sortop with collateid. This means all the code relating to
pathkeys won't need to change since we still use OIDs for the pathkeys,
they're just not operator oids anymore.

We can continue to support USING [op] as long as [op] is one of the GT
or LT operators in the OPERATOR CLASS. This restriction may exist
already, I can't tell.

All we lose is the ability to say USING [arbitrary op]. Does anybody
use this. Would people object to requiring the operator after USING to
be part of an operator class?

Have a nice day,

[1] http://www.postgresql.org/docs/8.0/interactive/queries-order.html
[2] http://www.postgresql.org/docs/8.0/interactive/sql-select.html
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: statement_timeout logging
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Does anybody use ORDER BY x USING y?