Received: from server.beierfeld.kabeljournal.de (pD9508740.dip.t-dialin.net [217.80.135.64]) by postgresql.org (Postfix) with SMTP id 5B21847594C for ; Thu, 28 Mar 2002 07:34:40 -0500 (EST) Received: (qmail 29619 invoked from network); 28 Mar 2002 12:34:42 -0000 Received: from station158.beierfeld.kabeljournal.de (HELO km3.de) (192.168.128.158) by server.beierfeld.kabeljournal.de with SMTP; 28 Mar 2002 12:34:42 -0000 Message-ID: <3CA30E9C.A45A5557@km3.de> Date: Thu, 28 Mar 2002 13:37:48 +0100 From: Andre Schubert X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.2.19-6.2.12 i586) X-Accept-Language: en MIME-Version: 1.0 To: Marin Dimitrov Cc: pgsql-admin@postgresql.org Subject: Re: Last_Inserted Value References: <3CA2CF1F.3451C5B4@km3.de> <000501c1d649$55b47110$9b0e32d4@sirma.bg> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200203/331 X-Sequence-Number: 3865 Marin Dimitrov schrieb: > > ----- 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 Oh thanks for your advice, i exactly use this transaction isolation level. > > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)