Re: Ordering Results by a Supplied Order

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: Ordering Results by a Supplied Order
Дата
Msg-id CAL_0b1tV16zvp7YNczL08p=Rxp99TFkb9iYCfzSSGstmHACqDw@mail.gmail.com
обсуждение исходный текст
Ответ на Ordering Results by a Supplied Order  (Michael Sacket <msacket@gammastream.com>)
Список pgsql-general
On Wed, Feb 5, 2014 at 7:16 PM, Michael Sacket <msacket@gammastream.com> wrote:
> Often times I find it necessary to work with table rows in a specific,
> generally user-supplied order.  It could be anything really that requires an
> ordering that can't come from a natural column.  Most of the time this
> involved manipulating a position column from the client application.  In any
> case, I've often found that to be cumbersome, but I think I've come up with
> a solution that some of you may find useful.

There also are some ways of doing it without creating an additional
column http://www.depesz.com/2010/07/25/how-to-order-by-some-random-query-defined-values/.

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com


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

Предыдущее
От: alexandros_e
Дата:
Сообщение: Re: Postgresql GROUP BY "SIMILAR" but not equal values
Следующее
От: Michael Sacket
Дата:
Сообщение: Re: Ordering Results by a Supplied Order