Re: integer instead of 'double precision'?

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Henry Drexler <alonup8tb(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: integer instead of 'double precision'?
Date: 2011-09-09 17:01:44
Message-ID: B3943E46-A027-4A83-A286-B06CF73B7890@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sep 9, 2011, at 8:42 AM, Henry Drexler wrote:

> 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?

Use floating point types in the calculation to begin with.

1.0/3.0
1::float8 / 3::float8
float8(1) / float8(3)
1.0/3
1/3.0
1::float8 / 3
...

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
http://www.elevated-dev.com/
(303) 722-0567 voice

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2011-09-09 17:10:22 Re: PostgreSQL Upgrade Procedure
Previous Message Raymond O'Donnell 2011-09-09 16:25:40 Re: PostgreSQL Upgrade Procedure