Received: from harbinger.sirma.bg (harbinger.sirma.bg [212.50.14.140]) by postgresql.org (Postfix) with ESMTP id 8811647594C for ; Thu, 28 Mar 2002 06:11:45 -0500 (EST) Received: (from root@localhost) by harbinger.sirma.bg (8.9.3/8.9.3) id NAA23382; Thu, 28 Mar 2002 13:11:36 +0200 Received: from redhat.sirma.bg (mail.sirma.bg [212.50.14.133]) by harbinger.sirma.bg (8.9.3/8.9.3) with ESMTP id NAA23377; Thu, 28 Mar 2002 13:11:35 +0200 Received: from pillango (pillango.sirma.int [192.168.128.42]) by redhat.sirma.bg (8.9.3/8.9.3) with SMTP id NAA01919; Thu, 28 Mar 2002 13:11:37 +0200 Message-ID: <000501c1d649$55b47110$9b0e32d4@sirma.bg> From: "Marin Dimitrov" To: "Andre Schubert" , References: <3CA2CF1F.3451C5B4@km3.de> Subject: Re: Last_Inserted Value Date: Thu, 28 Mar 2002 13:11:39 +0200 Organization: Sirma AI MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Virus-Scanned: X-Archive-Number: 200203/330 X-Sequence-Number: 3864 ----- Original Message ----- From: "Andre Schubert" > > Can i do a select id from foo order by id desc limit 1 before the end of > the transaction, > does this return exactly the row i inserted for this transaction? > only if u use SERIALIZABLE transaction isolation level - then the transactions committed from other users *while* your transaction was in progress are not visible in the default READ COMMITED level other committed transactions will interfere with the "select id from foo order by id desc limit 1" you'll issue before the end of your transaction take a look at "Read Committed and Serializable Isolation Levels" from "PostgreSQL: Introduction and Concepts" hth, Marin