Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 90FE563613B for ; Mon, 13 Jul 2009 16:46:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 99639-01-7 for ; Mon, 13 Jul 2009 16:46:04 -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 A5F9F634505 for ; Mon, 13 Jul 2009 16:45:06 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MQRST-0003O6-8u for pgsql-jdbc@postgresql.org; Mon, 13 Jul 2009 19:45:05 +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 19:45:05 +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 19:45:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: DELETE ... RETURNING Date: Mon, 13 Jul 2009 21:44:57 +0200 Lines: 17 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; 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 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.514 tagged_above=0 required=5 tests=AWL=-1.292, SUBJ_ALL_CAPS=1.806 X-Spam-Level: X-Archive-Number: 200907/23 X-Sequence-Number: 19791 Hi, when using the RETURNING clause in a DELETE statement the driver throws an error: org.postgresql.util.PSQLException: A result was returned when none was expected. The code that I'm using is as follows: Statement stmt = connection.createStatement(); stmt.executeUpdate("delete from person where firstname like 'A%' returning id"); Am I missing something or is the "RETURNING" feature not supported by the driver? I'm using postgresql-8.4-701.jdbc3.jar with Java5 Regards Thomas