Re: Select (str)::FLOAT8 BUG

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Select (str)::FLOAT8 BUG
Дата
Msg-id 24125.1077122177@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Select (str)::FLOAT8 BUG  ("Rafael Villalobos Prats" <rvillalobos@asapci.es>)
Список pgsql-bugs
"Rafael Villalobos Prats" <rvillalobos@asapci.es> writes:
> Why is different: 'SELECT (xxxxx)::FLOAT8' than 'SELECT xxxxx::FLOAT8'

The :: operator binds more tightly than most other operators.  As Iain
replied, most of your divisions are going to be integer divisions that
discard the fractional part.  You can either add casts or add ".0" to
your numbers to cause them to be considered non-integers.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: zlib directory in configure.
Следующее
От: "Roopali Sharma"
Дата:
Сообщение: pg_restore problems