Trouble with floats in Postgresql
Friedrich Dominicus <[email protected]> Sat, 06 May 2006 08:30:53 +0200
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Organization | Q Software Solutions GmbH |
| Message-ID | <[email protected]> |
See the following code:
(def-view-class t1 ()
((val :type float :initform 0.16 :accessor val)))
Create an object of that type and safe it in postgres.
(setf *tobj* (make-instance 't1))
#<T1 {10032C6201}>
DB> (update-records-from-instance *tobj*)
; No value
It has been inserted:
elect * from t1;
val
------
0.16
0.16
(2 Zeilen)
try to fetch an object of this type:
(setf *tobj2* (car (select 't1 :flatp t)))
#<T1 {1003084881}>
check the value:
(val *tobj2*)
0.0d0
?
So what's going on here. Wrong type? Bug?
Regards
Friedrich