From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | Bob Dusek <bobd(at)palaver(dot)net>, tolik(at)icomm(dot)ru (Anatoly K(dot) Lasareff), PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re[2]: [GENERAL] Dividing Money |
Date: | 1998-12-02 12:32:04 |
Message-ID: | 13563.981202@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello Anatoly,
mercoledì, 2 dicembre 98, you wrote:
>>>>>> "BD" == Bob Dusek <bobd(at)palaver(dot)net> writes:
AKL> BD> When I query my database, using 'select price from item_money;', postgres
AKL> BD> returns just what I asked for....
AKL> BD> (the first seven rows)
AKL> BD> price
AKL> BD> -------
AKL> BD> $4.45
AKL> BD> $2.95
AKL> BD> $4.45
AKL> BD> $2.95
AKL> BD> $3.95
AKL> BD> $3.95
AKL> BD> $3.95
AKL> BD> When I query my database using the query 'select price::float as price
AKL> BD> from item_money', I get back some wierd stuff....
AKL> BD> (the first seven rows)
AKL> BD> price
AKL> BD> ----------
AKL> BD> 1080319164
AKL> BD> 1080319108
AKL> BD> 1080319052
AKL> BD> 1080318996
AKL> BD> 1080318940
AKL> BD> 1080318884
AKL> BD> 1080318828
AKL> BD> In my first query results, the first row is the same as the third row.
AKL> BD> And, the second row is the same as the fourth row. And, rows 5,6,7 are
AKL> BD> all the same. However, in the results returned from my second query,
AKL> BD> there are not any rows of equal value.... ???
I don't know your PostgreSQL version but I suppose you have 6.3.2 or
lower.
There was a problem to cast money to float on such versions.
v6.4 doesn't allow this kind of cast.
prova=> select sal::float from emp;
ERROR: No such function 'float8' with the specified attributes
prova=> select sal::float from emp;
-Jose'-
From | Date | Subject | |
---|---|---|---|
Next Message | Maria Teresa Faga | 1998-12-02 14:32:04 | Text field. |
Previous Message | Anatoly K. Lasareff | 1998-12-02 07:22:23 | Re: [GENERAL] Dividing Money |