Re: Error while retrieving generated keys - Mailing list pgsql-jdbc

From Heikki Linnakangas
Subject Re: Error while retrieving generated keys
Date
Msg-id 45F1D1F6.3070802@enterprisedb.com
Whole thread Raw
In response to Re: Error while retrieving generated keys  ("Gary Greenberg" <gary@icontrol.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: "Gary Greenberg"
Date:
Subject: Re: Error while retrieving generated keys
Next
From: "Mike Clements"
Date:
Subject: Re: Error while retrieving generated keys