X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C039A52C09 for ; Wed, 27 Jul 2005 10:37:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55047-03 for ; Wed, 27 Jul 2005 13:37:51 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 26C1A52BFC for ; Wed, 27 Jul 2005 10:37:49 -0300 (ADT) Received: (qmail 3895 invoked from network); 27 Jul 2005 13:37:53 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 27 Jul 2005 13:37:53 -0000 In-Reply-To: <3617A3C21370D045B75C0A40A7A6530D0B37E19A@ntexc2buc.do-office.buc.materna.com> References: <3617A3C21370D045B75C0A40A7A6530D0B37E19A@ntexc2buc.do-office.buc.materna.com> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <753B003A-F850-4450-A116-88E6BC353BA3@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: INSERT and get ID Date: Wed, 27 Jul 2005 09:37:52 -0400 To: Peter.Zoche@materna.de X-Mailer: Apple Mail (2.733) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.014 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/360 X-Sequence-Number: 13508 Yes, it's absolutely safe! Dave On 27-Jul-05, at 9:29 AM, Peter.Zoche@materna.de wrote: >> You have to do a a "SELECT curval('myseq')" after the insert. >> > > I had this in mind, too, but I am not sure if it is really safe if > there are several inserts at the same time... > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend > >