Re: Division in Postgre

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Division in Postgre
Дата
Msg-id 20050429205407.B60676@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Division in Postgre  ("tuan" <atuan_h@hotmail.com>)
Список pgsql-sql
On Sun, 24 Apr 2005, tuan wrote:

> In sql server my division select cast(3 as float)/10 is 0.29999999999.
> But in postgres select cast(3 as float8)/10 is 0.3. How to get result like
> sql server?

I believe you can control what precision is used in printing the float
results with extra_float_digits. I believe setting it to 2 will give a
0.29... result however it has more 9s than the above.



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Question about update syntaxt
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Build issues: "-static" builds resulting initdb problems