Re: DELETE ... RETURNING

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: DELETE ... RETURNING
Date: 2009-07-13 21:42:01
Message-ID: 4A5BAA29.9000004@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thomas Kellerer wrote:

> At least executeUpdate() should not throw an exception.

Wrong, see the javadoc:

> Throws:
> SQLException - if a database access error occurs or the SQL statement returns a ResultSet object

Your SQL statement is returning a ResultSet object, so executeUpdate
correctly throws an exception.

Use executeQuery() or execute().

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2009-07-13 21:54:55 Re: DELETE ... RETURNING
Previous Message David Rees 2009-07-13 21:20:06 Re: Java long