Личный кабинет
Укажите e-mail, на который будет выслан код восстановления пароля.
На указанный вами адрес e-mail был выслан код подтверждения аккаунта. Введите полученный код для продолжения:
Введите новый пароль два раза:
Henry, Does this suit your need? select 1/3::float as answer; answer ------------------- 0.333333333333333(1 row) From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Henry DrexlerSent: Friday, September 09, 2011 10:42 AMTo: pgsql-general@postgresql.orgSubject: [GENERAL] integer instead of 'double precision'? take any table and run Query---------------------select1/3fromstoragelimit 1 Result---------------------?column? integer0 Expected Result---------------------?column?double precision 0.33333... Question---------------------Since there is no column type to begin with as this is a made-up column, shouldn't postgres know it is double precision due to the remainder? I thought perhaps I could cast it as double precision as noted on http://www.postgresql.org/docs/8.3/interactive/sql-expressions.html though doing the following: selectfloat8(1/3)fromstoragelimit 1 results in: float8double precision0 any ideas on how to get this type of a manufactured column (not sure the right term for it) to show the double precision result?
Henry,
Does this suit your need?
select 1/3::float as answer;
answer
-------------------
0.333333333333333
(1 row)
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Henry DrexlerSent: Friday, September 09, 2011 10:42 AMTo: pgsql-general@postgresql.orgSubject: [GENERAL] integer instead of 'double precision'?
take any table and run
Query
---------------------
select
1/3
from
storage
limit 1
Result
?column?
integer
0
Expected Result
double precision
0.33333...
Question
Since there is no column type to begin with as this is a made-up column, shouldn't postgres know it is double precision due to the remainder?
I thought perhaps I could cast it as double precision as noted on http://www.postgresql.org/docs/8.3/interactive/sql-expressions.html
though doing the following:
float8(1/3)
results in:
float8
any ideas on how to get this type of a manufactured column (not sure the right term for it) to show the double precision result?
В списке pgsql-general по дате отправления: