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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 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-12 15:00:38
Message-ID: 9756.1026486038@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-odbc
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

In response to

Responses

pgsql-odbc by date

Next:From: Stelios SfakianakisDate: 2002-07-12 15:13:06
Subject: Re: 'select count...' returns SQL_VARCHAR?
Previous:From: Stelios SfakianakisDate: 2002-07-12 12:05:04
Subject: 'select count...' returns SQL_VARCHAR?

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