On Fri, Nov 10, 2000 at 01:13:23PM -0500, Will Fitzgerald wrote:
> I want to store prices in a table. What's the best way to do this (since
> 'money' is deprecated)?
use int4 (or int8) and assume that the value is multipied by 100 (or another
value - depends on your local currency.
for example:
$400
i will store as
40000
$2.34
i will store as
234
this is much better, and safer than useing floating point fields.
depesz
--
hubert depesz lubaczewski
------------------------------------------------------------------------
najwspanialszą rzeczą jaką dało nam nowoczesne społeczeństwo,
jest niesamowita wręcz łatwość unikania kontaktów z nim ...