Re: Re: Trouble with floats in Postgresql
Marcus Pearce <[email protected]> Mon, 8 May 2006 11:08:02 +0100 (BST)
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 8 May 2006, Friedrich Dominicus wrote:
> Here the results of my try with 3.5.7, Postgresql 8.1.x
> SBCL 0.9.12.5 (Debian AMD64 unstable)
Again, I can't reproduce this behaviour with CLSQL 3.5.7 and Postgresql
8.0.7 (SBCL 0.9.12, linux/x86) which suggests that some change in
Postgresql between versions 8.0.7 and 8.1 is the likely culprit.[1]
CL-USER> (clsql:def-view-class t1 ()
((val :type float :accessor val)))
#<CLSQL-SYS::STANDARD-DB-CLASS T1>
CL-USER> (defun test-t1 ()
(clsql:drop-table 't1 :if-does-not-exist :ignore)
(clsql:create-view-from-class 't1)
(let ((obj (make-instance 't1)))
(setf (val obj) 0.07)
(clsql:update-records-from-instance obj)
(let ((fobj (car (clsql:select 't1 :flatp t))))
(val fobj))))
TEST-T1
CL-USER> (test-t1)
0.07d0
Cheers,
Marcus
[1] http://www.postgresql.org/docs/8.1/static/release-8-1.html