Re: 'select count...' returns SQL_VARCHAR?

From: Stelios Sfakianakis <ssfak(at)ics(dot)forth(dot)gr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: 'select count...' returns SQL_VARCHAR?
Date: 2002-07-12 15:13:06
Message-ID: 3D2EF202.5040500@ics.forth.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Tom Lane wrote:
> Stelios Sfakianakis <ssfak(at)ics(dot)forth(dot)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

It works as expected, of course!
Thank you very much!

Best regards
Stelios Sfakianakis

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
"Right now, CORBA *is* the future of middleware. I'm not aware of any
other middleware that would come even close in portability, platform
support, features, performance, or multi-vendor support. It will be a
minimum of six or seven years before any other middleware platform
will be able to match that."
--- Michi Henning in news:comp.object.corba, 28/06/2002

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Joe Conway 2002-07-12 16:59:39 Re: MS Access ODBC for Linux?
Previous Message Tom Lane 2002-07-12 15:00:38 Re: 'select count...' returns SQL_VARCHAR?