Re: Oracle: result type for count(*)
Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Wed, 12 Oct 2005 11:18:23 -0600
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
Edi Weitz wrote:
> CL-USER 5 > (query "select count(*) from class_table" :result-types :auto)
> ((858.0))
> ("COUNT(*)")
>
> I would have expected an integer as the result (and that's what I seem
> to get with other databases).
:result-types :auto means that CLSQL snarfs type information on each
field from the database backend. I believe that Oracle is telling CLSQL that
the result type is floating point. At least, when I was writing the
backend support for Oracle, I noticed that it was giving me floating
point results for operations that I'd suspect should have an integer
result -- such as MAX(foo) where foo is an integer field.
--
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]