pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Todorski <atodorski@automate.com>
To: pgsql-jdbc@postgresql.org
Subject: Returning generated keys
Date: Wed, 11 Aug 2010 08:59:13 -0400
Message-ID: <4C629EA1.3020409@automate.com> (raw)

I would like to clarify the pgsql JDBC's current and intended future 
handling of returning auto-generated keys.  As far as I can tell, 
currently all inserted columns are returned, not just any that were 
auto-generated and are keys:

The changelog for 8.4dev-700 says:

"Implement basic generated keys support. It does not support returning
columns by index because that requires complicated parsing of the query to
determine the table being used. Right now it supports returning all columns
and columns by name. (jurka)"

Is there a time line for fully implementing this functionality?  Also, 
wouldn't the query parsing resolve to either the third token (query 
split on non-word characters limit four matches: "insert into <table> 
<rest of query>") or determining for each trigger fired by the query if 
it resulted in data being inserted and applying the same logic to those 
queries?

Thanks!

Adam



Message-ID: <4C629EA1.3020409@automate.com>
Permalink:  ../4C629EA1.3020409@automate.com/
Also on:    postgresql.org/message-id/4C629EA1.3020409@automate.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: atodorski@automate.com
  Subject: Re: Returning generated keys
  In-Reply-To: <4C629EA1.3020409@automate.com>
  References: <4C629EA1.3020409@automate.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