pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: DELETE ... RETURNING
Date: Tue, 14 Jul 2009 09:42:01 +1200
Message-ID: <4A5BAA29.9000004@opencloud.com> (raw)
In-Reply-To: <h3g536$kq4$1@ger.gmane.org>
References: <h3g2rn$dn8$1@ger.gmane.org>
	<226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com>
	<h3g536$kq4$1@ger.gmane.org>

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



view thread (10+ messages)  latest in thread

Message-ID: <4A5BAA29.9000004@opencloud.com>
Permalink:  ../4A5BAA29.9000004@opencloud.com/
Also on:    postgresql.org/message-id/4A5BAA29.9000004@opencloud.com

 · 

reply

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: oliver@opencloud.com, spam_eater@gmx.net
  Subject: Re: DELETE ... RETURNING
  In-Reply-To: <4A5BAA29.9000004@opencloud.com>
  References: <h3g2rn$dn8$1@ger.gmane.org> <226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com> <h3g536$kq4$1@ger.gmane.org> <4A5BAA29.9000004@opencloud.com>

* 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