Re: Sorting dates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sorting dates
Дата
Msg-id 2646.1242396678@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Sorting dates  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
Peter Eisentraut <peter_e@gmx.net> writes:
> On Friday 15 May 2009 01:07:11 Hershel Fisch wrote:
>> Hi, I realized that sorting date is done like text and not numeric (dates)
>> e.g. SELELCT * FROM database_name ORDER BY date ASC
>>
>> Return order
>>
>> 3/02/09
>> 4/19/09
>> 4/2/09

> This report would make a lot more sense if you posted your schema definition.

I'd bet a good deal that the "date" column isn't a datetime type at all,
but text or varchar.

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file