X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0AF1D52849 for ; Wed, 8 Jun 2005 08:41:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94697-07 for ; Wed, 8 Jun 2005 11:41:44 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7D90052921 for ; Wed, 8 Jun 2005 08:41:43 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DfyrJ-0002AY-3R for pgsql-jdbc@postgresql.org; Wed, 08 Jun 2005 13:36:33 +0200 Received: from cracatoa.sadig.com ([200.102.76.237]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jun 2005 13:36:32 +0200 Received: from fh by cracatoa.sadig.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jun 2005 13:36:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Fernando Hartmann Subject: Re: Num of returned ROWS Date: Wed, 08 Jun 2005 08:38:38 -0300 Lines: 28 Message-ID: References: <42A62275.2020900@opencloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cracatoa.sadig.com User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <42A62275.2020900@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/36 X-Sequence-Number: 12998 Oliver Jowett wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > Ok, but and the last line ? The select count ? They don't return the number of rows too!