Re: How I can get the real data type result instead of

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How I can get the real data type result instead of
Дата
Msg-id 9748.1143000049@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How I can get the real data type result instead of  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
>>> Try:
>>> order by count(id)/age::float
>>
>> Or you can use the standard grammer:
>>
>> order by cast(count(id)/age as float)

> Don't you have to cast before the divide?

Yeah.  The :: case is OK because :: binds more tightly than /
but the second suggestion is wrong :-(

            regards, tom lane

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

Предыдущее
От: "Ken Winter"
Дата:
Сообщение: Confused about a function returning SETOF
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Confused about a function returning SETOF