From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Gary Greenberg <gary@icontrol.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Error while retrieving generated keys
Date: Fri, 09 Mar 2007 21:30:30 +0000
Message-ID: <45F1D1F6.3070802@enterprisedb.com> (raw)
In-Reply-To: <031f01c7628f$fed55e30$740a3c0a@D9GKB4C1>
References: <031f01c7628f$fed55e30$740a3c0a@D9GKB4C1>
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
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-odbc@postgresql.org
Cc: heikki@enterprisedb.com, gary@icontrol.com, pgsql-jdbc@postgresql.org
Subject: Re: Error while retrieving generated keys
In-Reply-To: <45F1D1F6.3070802@enterprisedb.com>
References: <031f01c7628f$fed55e30$740a3c0a@D9GKB4C1> <45F1D1F6.3070802@enterprisedb.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