Re: Num of returned ROWS - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Num of returned ROWS
Date
Msg-id 42A62275.2020900@opencloud.com
Whole thread Raw
In response to Num of returned ROWS  (Fernando Hartmann <fh@sadig.com>)
Responses Re: Num of returned ROWS  (Fernando Hartmann <fh@sadig.com>)
List pgsql-jdbc
Fernando Hartmann wrote:

>     I'm using Postgres 8.0.3 and JDBC build 311 (tried 400 too) and
> using executeUpdate to send the following command to DB:
>
> set datestyle to ISO,DMY;
> create table table1 as select F1, sum(F10) from table where F1 between
> '1/1/2001' and '31/12/2004' group by F1;
> select count(*) from table1
>
>     But the executeUpdate always return 0, even when the cont(*) return
> a number other than 0.
>
>     Any ideas ?

The backend doesn't return the number of rows affected for a CREATE
TABLE .. AS, so the driver can't give you a useful number.

-O

pgsql-jdbc by date:

Previous
From: Fernando Hartmann
Date:
Subject: Num of returned ROWS
Next
From: "Kevin Grittner"
Date:
Subject: ResultSet.getObject return type for smallint