Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0DAF29FB289 for ; Fri, 9 Mar 2007 17:30:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 13932-02 for ; Fri, 9 Mar 2007 17:30:35 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id A81869FB61B for ; Fri, 9 Mar 2007 17:30:37 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so1403936ugf for ; Fri, 09 Mar 2007 13:30:33 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=gM+5u9cTMa2lUHFpDAygSAbA32aesFa3PGlhs8bv4hqZxVOvjJTQ7J2dWd1LwSX9u35M7YqaUCV3cZt8YuKfD2tyVYYk+LRQ7/a8Txwm76/OMzywGxgOeder48kbAbPappYeUXoiEgOVvbuatZkCyg53qvqXcZXHOqs4qxMchA0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=faE5YVoA/+7nKw9UHJFytmAAXuLbOui2xmiul1e99mbXtELcHJt8J3GsKFFml30LTAukwX28Dt9fph8rZfkJN/RGLd4rmZOvChexZ4574s+upM0V7vvDo4Fm9hlORdDelmaTmpMfKINxdyjJarhez4RcrwAaFvl4zDQy/2FHGtA= Received: by 10.66.243.4 with SMTP id q4mr10501208ugh.1173475833435; Fri, 09 Mar 2007 13:30:33 -0800 (PST) Received: from ?192.168.1.34? ( [82.3.248.250]) by mx.google.com with ESMTP id c22sm8051063ika.2007.03.09.13.30.29; Fri, 09 Mar 2007 13:30:31 -0800 (PST) Message-ID: <45F1D1F6.3070802@enterprisedb.com> Date: Fri, 09 Mar 2007 21:30:30 +0000 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: Gary Greenberg CC: pgsql-jdbc@postgresql.org Subject: Re: Error while retrieving generated keys References: <031f01c7628f$fed55e30$740a3c0a@D9GKB4C1> In-Reply-To: <031f01c7628f$fed55e30$740a3c0a@D9GKB4C1> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/90 X-Sequence-Number: 16804 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