X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id F18FED1B45E for ; Sun, 25 Jan 2004 17:15:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 15375-03 for ; Sun, 25 Jan 2004 13:14:34 -0400 (AST) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id C1CF3D1B448 for ; Sun, 25 Jan 2004 13:14:33 -0400 (AST) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1AknqD-000Pol-0Y; Sun, 25 Jan 2004 17:14:33 +0000 Received: from linda.lfix.co.uk ([192.168.1.1]) by cerberus.lfix.co.uk with esmtp (Exim 4.30) id 1Aknq3-0006oZ-IZ; Sun, 25 Jan 2004 17:14:23 +0000 Subject: Re: Selects query inside function must read commited data From: Oliver Elphick To: aspire420@hotpop.com Cc: pgsql-admin@postgresql.org In-Reply-To: <4013EF71.9080603@sancharnet.in> References: <40138377.2070503@sancharnet.in> <1075047334.1491.16.camel@linda.lfix.co.uk> <4013EF71.9080603@sancharnet.in> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1075050833.1496.18.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 25 Jan 2004 17:13:53 +0000 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/201 X-Sequence-Number: 12064 On Sun, 2004-01-25 at 16:31, 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. It's in the manual, somewhere; or try it and verify that what I say is correct. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "My little children, let us not love in word, neither in tongue; but in deed and in truth." I John 3:18