pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Lazarus <drlaz@attglobal.net>
To: Benjamin Shive <bshive@comcast.net>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: getGeneratedKeys() support?
Date: Thu, 30 Aug 2007 14:32:17 -0700
Message-ID: <462642779.20070830143217@attglobal.net> (raw)
In-Reply-To: <4BE87629-2F9F-479A-8B81-6DD8C7F93F78@comcast.net>
References: <5453CA13-139C-46D7-9EAB-593155A7DE2E@comcast.net>
	<1163508774.20070819212307@attglobal.net>
	<4BE87629-2F9F-479A-8B81-6DD8C7F93F78@comcast.net>

The current JDBC driver supports the RETURNING clause and it does
exactly what someone would want.

ResultSet rs = statement.executeQuery("INSERT INTO z(myField) VALUES(0)
RETURNING keyName") ;
int key = rs.getInt(1);

Hallelujah




view thread (2+ messages)

Message-ID: <462642779.20070830143217@attglobal.net>
Permalink:  ../462642779.20070830143217@attglobal.net/
Also on:    postgresql.org/message-id/462642779.20070830143217@attglobal.net

 · 

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: drlaz@attglobal.net, bshive@comcast.net
  Subject: Re: getGeneratedKeys() support?
  In-Reply-To: <462642779.20070830143217@attglobal.net>
  References: <5453CA13-139C-46D7-9EAB-593155A7DE2E@comcast.net> <1163508774.20070819212307@attglobal.net> <4BE87629-2F9F-479A-8B81-6DD8C7F93F78@comcast.net> <462642779.20070830143217@attglobal.net>

* 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