pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dennis Brakhane <brakhane@googlemail.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: DELETE ... RETURNING
Date: Mon, 13 Jul 2009 21:51:01 +0200
Message-ID: <226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com> (raw)
In-Reply-To: <h3g2rn$dn8$1@ger.gmane.org>
References: <h3g2rn$dn8$1@ger.gmane.org>

On Mon, Jul 13, 2009 at 9:44 PM, Thomas Kellerer<spam_eater@gmx.net> wrote:
> 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?

executeUpdate by definitionem can only return an int, the number of
rows affected.

You probably can use stmt.executeQuery instead



view thread (10+ messages)  latest in thread

Message-ID: <226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com>
Permalink:  ../226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com/
Also on:    postgresql.org/message-id/226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.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: brakhane@googlemail.com, spam_eater@gmx.net
  Subject: Re: DELETE ... RETURNING
  In-Reply-To: <226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com>
  References: <h3g2rn$dn8$1@ger.gmane.org> <226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.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