From: Andre Schubert <andre.schubert@km3.de>
To: Marin Dimitrov <marin.dimitrov@sirma.bg>
Cc: pgsql-admin@postgresql.org
Subject: Re: Last_Inserted Value
Date: Thu, 28 Mar 2002 13:37:48 +0100
Message-ID: <3CA30E9C.A45A5557@km3.de> (raw)
References: <3CA2CF1F.3451C5B4@km3.de>
<000501c1d649$55b47110$9b0e32d4@sirma.bg>
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)
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-admin@postgresql.org
Cc: andre.schubert@km3.de, marin.dimitrov@sirma.bg
Subject: Re: Last_Inserted Value
In-Reply-To: <3CA30E9C.A45A5557@km3.de>
References: <3CA2CF1F.3451C5B4@km3.de> <000501c1d649$55b47110$9b0e32d4@sirma.bg> <3CA30E9C.A45A5557@km3.de>
* 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