From: Andrew Biagioni <andrew.biagioni@e-greek.net>
To: aspire420@hotpop.com
Cc: Oliver Elphick <olly@lfix.co.uk>
Cc: pgsql-admin@postgresql.org
Subject: Re: Selects query inside function must read commited data
Date: Sun, 25 Jan 2004 13:09:09 -0500
Message-ID: <40140645.2090404@e-greek.net> (raw)
In-Reply-To: <4013EF71.9080603@sancharnet.in>
References: <40138377.2070503@sancharnet.in>
<1075047334.1491.16.camel@linda.lfix.co.uk>
<4013EF71.9080603@sancharnet.in>
In the v7.3 docs:
http://www.postgresql.org/docs/7.3/interactive/transaction-iso.html#XACT-READ-COMMITTED
/Read Committed/ is the default isolation level in PostgreSQL. When a
transaction runs on this isolation level, a SELECT query sees only data
committed before the query began; it never sees either uncommitted data
or changes committed during query execution by concurrent transactions.
(However, the SELECT does see the effects of previous updates executed
within its own transaction, even though they are not yet committed.) In
effect, a SELECT query sees a snapshot of the database as of the instant
that that query begins to run. Notice that two successive SELECTs can
see different data, even though they are within a single transaction, if
other transactions commit changes during execution of the first SELECT.
Andrew
V i s h a l Kashyap @ [Sai Hertz And Control Systems] wrote:
> Dear Oliver Elphick ,
>
>>>If I am not wrong PostgreSQL select statements works on committed data
>>>thus the new
>>>inserted data at #3 must not be available to sai_func_b() till #5
>>>
>>>
>>
>>No. All operations by a single transaction are visible inside the
>>transaction. Therefore an encapsulated function can see anything already
>>done in the whole transaction. A function must be entirely inside a
>>transaction and cannot start a transaction, so there can never be any
>>problem about this.
>>
>>
> Loads of thanks for the kind reply .
> Would be greatefull if you kindly post some links/refrences to support
> your answer for the said.
> Thanks one again .
>
>
>--
>Regards,
>Vishal Kashyap
>
>~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
>I Know you believe my words so logon to Jabber.org
>and add vishalkashyap@jabber.org to your roster.
> OR
>Seek Me at 264360076
>~*~*~*~*~*~*~*~*
>I am usually called as Vishal Kashyap
>but my Girlfriend calls me as Vishal CASH UP.
>This is because others identify me because of my generosity
>but my Girlfriend identify me because of my CASH.
>~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
>
>
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: andrew.biagioni@e-greek.net, aspire420@hotpop.com, olly@lfix.co.uk
Subject: Re: Selects query inside function must read commited data
In-Reply-To: <40140645.2090404@e-greek.net>
References: <40138377.2070503@sancharnet.in> <1075047334.1491.16.camel@linda.lfix.co.uk> <4013EF71.9080603@sancharnet.in> <40140645.2090404@e-greek.net>
* 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