Re: Weird problem with aggregate functions

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: andrea(dot)aime(at)comune(dot)modena(dot)it, gustavoboiko(at)ieg(dot)com(dot)br, Postgres ODBC <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Weird problem with aggregate functions
Date: 2001-11-07 00:34:11
Message-ID: 3BE88183.2024DC74@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Tom Lane wrote:
>
> "Andrea Aime" <aaime(at)comune(dot)modena(dot)it> writes:
> > Thanks, it works!!! But why doesn't it work without the
> > cast? This is a good workaround, but the standard behaviour
> > is a bug, isn't it?
>
> No, it isn't. We *used* to return int4 as the result of sum(int4),
> etc, but that tends to suffer from overflow. And the deficiency of
> using int4 as the result of avg() should be pretty obvious ;-)
>

[snip]

> >From what I've heard, VB simply does not recognize Postgres' NUMERIC
> datatype at all. I don't know if that's VB's fault or a problem in
> our ODBC driver.

It seems a problem of neither VB nor our ODBC driver.
We would get the expected result unless we use Microsoft
Cursor Service by setting the CursorLocation property
as adUseClient.
Unfortunately we couldn't get an updatable recordset using
ADO unless we use Microsoft Cursor Service.

regards,
Hiroshi Inoue

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2001-11-07 00:56:29 Re: Access 2000 & Views
Previous Message Tom Lane 2001-11-06 19:02:35 Re: Weird problem with aggregate functions