Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Дата
Msg-id dcc563d10711102134j4e3d042cp5e8647e4c8c37f01@mail.gmail.com
обсуждение исходный текст
Ответ на Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?  (rihad <rihad@mail.ru>)
Ответы Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Список pgsql-general
On Nov 9, 2007 5:17 AM, rihad <rihad@mail.ru> wrote:
> > Em Wednesday 07 November 2007 13:54:32 rihad escreveu:
> >>
> >> May I, as an outsider, comment? :) I really think of ASC NULLS FIRST
> >> (and DESC NULLS LAST) as the way to go. Imagine a last_login column that
> >> sorts users that have not logged in as the most recently logged in,
> >> which is not very intuitive. I vote for sort_nulls_first defaulting to
> >> false in order not to break bc.
> >
> > But then, when ordering by login date, you should use COALESCE and infinity
> > for them
> > (http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html).
>
> It's not an easy thing to do with for example Propel 1.2 ORM (written in
> PHP):
>
> $criteria->addDescendingOrderByColumn(myPeer::LAST_LOGIN); // no place
> to shove database-specific attributes in.

Why not create an updatable view that orders the way you want it to?

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

Предыдущее
От: rihad
Дата:
Сообщение: Re: strange infinite loop in plpgsql
Следующее
От: rihad
Дата:
Сообщение: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?