Returning generated keys

From: Adam Todorski <atodorski(at)automate(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Returning generated keys
Date: 2010-08-11 12:59:13
Message-ID: 4C629EA1.3020409@automate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Toni Helenius 2010-08-16 09:01:56 TEXT columns should indentify as java.sql.Types.CLOB
Previous Message John T. Dow 2010-08-11 04:36:54 Re: 9.0 Driver