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

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Stelios Sfakianakis" <ssfak(at)ics(dot)forth(dot)gr>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: 'select count...' returns SQL_VARCHAR?
Date: 2002-07-13 23:00:07
Message-ID: EKEJJICOHDIEMGPNIFIJIEELIGAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> -----Original Message-----
> From: Tom Lane
>
> 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.

It isn't a problem of the ODBC driver itself. The problem is if your
app (or the software you are using) can handle bigint properly.
Unfortunately there are some(many ?) softwares that can't
handle bigint properly and so the ODBC driver has returned
VARCHAR for int8 type. Recently I added the INT8 As (bigint,
numeric, double, ...) option to cope with this *sum(int4) returns
int8* problem.

regards,
Hiroshi Inoue

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Preston Lord 2002-07-16 09:14:27 postgres & iODBC
Previous Message Joe Conway 2002-07-12 16:59:39 Re: MS Access ODBC for Linux?