Re: [GENERAL] Getting the result of a query using COUNT(*) - Mailing list pgsql-sql

From Yury Don
Subject Re: [GENERAL] Getting the result of a query using COUNT(*)
Date
Msg-id 39A5E877.537238D6@vpcit.ru
Whole thread Raw
List pgsql-sql
Jackson Ching wrote:
> 
> Hi,
> 
>         I'm using JSDK 2.0 and IBM JDK 1.3 on RedHat Linux 6.2
> 
>         As i test my servlet,  I got errors saying count(*) column not found in a query like this
> 
>         SELECT COUNT(*) FROM MyTable
> 
>         in my rs.getint("COUNT(*)");   in oracle it works fine, in postgresql it doesn't. how should i handle
aggregatefunctions in SQL then?
 
> 
>         Thanks
> 
> Jackson

What version of rostgres do you use?
SELECT COUNT(*) FROM MyTable works pretty well in postgres 6.5.1 and
later.
Perhaps problem is in java?

-- 
Sincerely yours,
Yury


pgsql-sql by date:

Previous
From: Yury Don
Date:
Subject: Re: weird structure
Next
From: Tom Lane
Date:
Subject: Re: Regular expression query