pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Boettcher <bboett@erm1.u-strasbg.fr>
To: pgsql-sql@postgresql.org
Subject: numeric conversions?
Date: Mon, 20 Nov 2000 16:51:33 +0100
Message-ID: <20001120165133.D25191@erm1.u-strasbg.fr> (raw)

Hello,

me again :(
i just ran into another problem....
didn't found it neither in the doc nor in the FAQ.....

the currencies conversion factors i use are stored as float4 in a table,
the values to apply on are stores as int4 ....

is the type casting done automaticly? how? can i have an influence of
the cast order? is there an easy way to doing the rounding?

the operation i want to do is something along this line:

int4 = ((int4) float4 * (float4)int4 +.5);


-- 
ciao bboett
==============================================================
bboett@earthling.net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....



view thread (2+ messages)  latest in thread

Message-ID: <20001120165133.D25191@erm1.u-strasbg.fr>
Permalink:  ../20001120165133.D25191@erm1.u-strasbg.fr/
Also on:    postgresql.org/message-id/20001120165133.D25191@erm1.u-strasbg.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: bboett@erm1.u-strasbg.fr
  Subject: Re: numeric conversions?
  In-Reply-To: <20001120165133.D25191@erm1.u-strasbg.fr>
  References: <20001120165133.D25191@erm1.u-strasbg.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox