From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: DELETE ... RETURNING
Date: Mon, 13 Jul 2009 21:44:57 +0200
Message-ID: <h3g2rn$dn8$1@ger.gmane.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: DELETE ... RETURNING
In-Reply-To: <h3g2rn$dn8$1@ger.gmane.org>
References: <h3g2rn$dn8$1@ger.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox