| От | Jon Lapham |
|---|---|
| Тема | Re: explicitly casting return value of avg() to float4 |
| Дата | |
| Msg-id | 3CC8575C.7010000@extracta.com.br обсуждение исходный текст |
| Ответ на | explicitly casting return value of avg() to float4 (Jon Lapham <lapham@extracta.com.br>) |
| Список | pgsql-general |
Tom Lane wrote: > [snip] > This isn't really any different from > > regression=# select 0.01::float4::float8; > float8 > --------------------- > 0.00999999977648258 > (1 row) > [snip] True enough. So, I guess my applications will have to first determine what the column precision is, an then use the appropriate ::float4 cast if the column is a float4 column. This stinks... but I do understand why it is the way it is. Is there an SQL-ic way to determine the column type (ie: float4) of a column? Thanks, -Jon -- -**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*--- Jon Lapham Extracta Moléculas Naturais, Rio de Janeiro, Brasil email: lapham@extracta.com.br web: http://www.extracta.com.br/ ***-*--*----*-------*------------*--------------------*---------------
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера