Re: 'select count...' returns SQL_VARCHAR? - Mailing list pgsql-odbc

From Tom Lane
Subject Re: 'select count...' returns SQL_VARCHAR?
Date
Msg-id 9756.1026486038@sss.pgh.pa.us
Whole thread Raw
In response to 'select count...' returns SQL_VARCHAR?  (Stelios Sfakianakis <ssfak@ics.forth.gr>)
Responses Re: 'select count...' returns SQL_VARCHAR?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-odbc
Stelios Sfakianakis <ssfak@ics.forth.gr> writes:
> I am using the PostgreSQL and its ODBC driver but there seems to be
> some problem with the "select count(...)..." queries. Here is my
> configuration:
>   - FreeBSD 4.6
>   - PostgreSQL 7.2.1

count() returns bigint (int8) in 7.2.  I seem to recall that ODBC has
some problem classifying bigint as numeric.  I don't recall if that's
a simple bug or a standards compatibility issue.  Anyway, the easiest
workaround may be to cast the result of count to integer (int4) so that
ODBC knows what to do with it.

            regards, tom lane

pgsql-odbc by date:

Previous
From: Preston Lord
Date:
Subject: MS Access ODBC for Linux?
Next
From: Stelios Sfakianakis
Date:
Subject: Re: 'select count...' returns SQL_VARCHAR?