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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Error while retrieving generated keys



Gary Greenberg wrote:
I don't know about an easy workaround. Especially while using frameworks.

There's plenty of options, for example calling lastval, or using INSERT RETURNING, or stored procedures. With frameworks, I'm sure you can usually work-around by configuring the framework properly. A little bit of googling tells me that you might be able to set hibernate.jdbc.use_get_generated_keys to false, though not being a Hibernate user myself I have no idea where to put that.

In any case, it would help a lot if you could write a FAQ entry of paragraph or two when you find a solution.

 > I am really disappointed that PostgreSQL is becoming a fossil.

;-) Now you're exaggerating.

Am I? Who, in his right mind will go back from using JPA or Hibernate to
plain old JDBC calls?

Should we go to managing transactions manually, OR mapping, etc?

The lack of one fairly new JDBC API call hardly makes the whole database management system a fossil, that's what I'm saying.

Ken Johanson posted a preliminary patch in February, but there was a bunch of issues with it. This is an open source project, so if you'd
like to see it happen, patches are more than welcome.

I can look up at this patch and see if I can contribute to fix it.
Unfortunately I am on tight project schedule.

How do I download the patch, though?

See the archives for the patch and discussion:

http://archives.postgresql.org/pgsql-jdbc/2007-02/msg00074.php

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group