Skip site navigation (1) Skip section navigation (2)

DELETE ... RETURNING

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: DELETE ... RETURNING
Date: 2009-07-13 19:44:57
Message-ID: h3g2rn$dn8$1@ger.gmane.org (view raw or flat)
Thread:
Lists: pgsql-jdbc
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


Responses

pgsql-jdbc by date

Next:From: Dennis BrakhaneDate: 2009-07-13 19:51:01
Subject: Re: DELETE ... RETURNING
Previous:From: Thomas KellererDate: 2009-07-13 19:37:08
Subject: No 8.4 documentation on the JDBC website

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group