Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 



pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group