Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A4B361336971 for ; Mon, 31 Jan 2011 11:42:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 26532-03 for ; Mon, 31 Jan 2011 15:42:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 25EF413364DE for ; Mon, 31 Jan 2011 11:42:09 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Mon, 31 Jan 2011 09:42:09 -0600 Message-Id: <4D4683EC020000250003A01A@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Mon, 31 Jan 2011 09:42:04 -0600 From: "Kevin Grittner" To: "Leon Starr" , Subject: Re: creating and accessing temp table data inside a non-committed transaction References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/193 X-Sequence-Number: 36633 Leon Starr wrote: > The problem is that the values x, y and z are inserted into a > permanent table Q early in the processing of my_func. Then, > several calls down in deep_func(), still inside my_func, I need to > access the value of x. I tried to do a select on Q to get the > value, but I came up NULL! Guessing that is because the > transaction hasn't committed yet since I am still inside my_func. > Right? I don't think so. Any database changes made by a transaction should be visible to that transaction. When you say "several calls down in deep_func()", you don't mean that you are in a BEFORE trigger function, or a function called from a BEFORE trigger, do you? Perhaps you could boil the issue down to a small self-contained example of the issue? -Kevin