Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E7C7E633057 for ; Mon, 13 Jul 2009 19:08:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91620-01-7 for ; Mon, 13 Jul 2009 19:08:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mail.postgresql.org (Postfix) with ESMTP id BF841636046 for ; Mon, 13 Jul 2009 19:08:17 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MQTh1-0001mo-7v for pgsql-jdbc@postgresql.org; Mon, 13 Jul 2009 22:08:15 +0000 Received: from ppp-93-104-90-24.dynamic.mnet-online.de ([93.104.90.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2009 22:08:15 +0000 Received: from spam_eater by ppp-93-104-90-24.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2009 22:08:15 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: DELETE ... RETURNING Date: Tue, 14 Jul 2009 00:08:05 +0200 Lines: 40 Message-ID: References: <226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com> <4A5BAA29.9000004@opencloud.com> <4A5BADCF.7030001@opencloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-93-104-90-24.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: <4A5BADCF.7030001@opencloud.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/30 X-Sequence-Number: 19798 Oliver Jowett wrote on 13.07.2009 23:57: > Thomas Kellerer wrote: > >> But my understanding is, that it should print "deleted: 3", and then >> iterate over the returned ids (but at least show the correct update count) > > You might want to turn on logLevel=2 and see what the server's actually > telling us. The update count is usually just derived from the command > status string, maybe something odd is happening there with DELETE .. > RETURNING The log output looks fine as far as I can tell: 00:06:22.037 (1) simple execute, handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@a20892, maxRows=0, fetchSize=0, flags=1 00:06:22.037 (1) FE=> Bind(stmt=S_1,portal=null) 00:06:22.037 (1) FE=> Execute(portal=null,limit=0) 00:06:22.037 (1) FE=> Parse(stmt=null,query="delete from test_delete returning id",oids={}) 00:06:22.037 (1) FE=> Bind(stmt=null,portal=null) 00:06:22.037 (1) FE=> Describe(portal=null) 00:06:22.037 (1) FE=> Execute(portal=null,limit=0) 00:06:22.037 (1) FE=> Sync 00:06:22.053 (1) <=BE BindComplete [null] 00:06:22.053 (1) <=BE CommandStatus(BEGIN) 00:06:22.053 (1) <=BE ParseComplete [null] 00:06:22.053 (1) <=BE BindComplete [null] 00:06:22.053 (1) <=BE RowDescription(1) 00:06:22.053 (1) <=BE DataRow 00:06:22.053 (1) <=BE DataRow 00:06:22.053 (1) <=BE DataRow 00:06:22.053 (1) <=BE CommandStatus(DELETE 3) 00:06:22.069 (1) <=BE ReadyForQuery(T) And it still doesn't explain why getMoreResults() is not working either. Regards Thomas