Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 024DC9FBD89 for ; Tue, 17 Jul 2007 12:28:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 12975-06 for ; Tue, 17 Jul 2007 12:28:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 3A6B79FBD91 for ; Tue, 17 Jul 2007 12:28:55 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1IAoys-0004OQ-Ia for pgsql-admin@postgresql.org; Tue, 17 Jul 2007 11:28:54 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 0603A4050; Tue, 17 Jul 2007 11:28:49 -0400 (EDT) Date: Tue, 17 Jul 2007 11:28:49 -0400 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: cache problem (v2) Message-ID: <20070717152848.GD21688@phlogiston.dyndns.org> References: <469B4927.9030604@eurofer.be> <20070716170957.GV18049@phlogiston.dyndns.org> <469BAF1D.8030108@eurofer.be> <20070716184837.GB18049@phlogiston.dyndns.org> <469BD389.4030606@eurofer.be> <20070716203641.GF18049@phlogiston.dyndns.org> <469C5AC4.7040903@eurofer.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <469C5AC4.7040903@eurofer.be> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/176 X-Sequence-Number: 26157 On Tue, Jul 17, 2007 at 07:59:32AM +0200, De Leeuw Guy wrote: > the COPY start a transaction Yes. _Everything_ is in a transaction in PostgreSQL. If you don't explicitly do BEGIN. . .COMMIT, then the system does it implicitly for each statement. > if yes each time my trigger select a data > and update then the value returned by the read are the value before the > transaction. It's true ? if yes my question are : also in the same > transaction (like my trigger) ? Your trigger function runs inside the transaction of the calling statement, unless you have explicitly started a transaction. I'm starting to get the impression you have a misunderstanding of how PostgreSQL works. I think you maybe need to spend some more time with the manual. If you find the English version puzzling, you can also work in French (at http://docs.postgresqlfr.org/) or German (I see a translation at http://www.postgresql.org/docs/books/pghandbuch.html.de; I dunno if there's a more recent one). Sorry, AFAIK there isn't one in Dutch. A -- Andrew Sullivan | ajs@crankycanuck.ca The whole tendency of modern prose is away from concreteness. --George Orwell