Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.

Hiroshi Inoue

In response to

pgsql-odbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group