Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 584DC1337B8A for ; Mon, 31 Jan 2011 13:13:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 58621-01 for ; Mon, 31 Jan 2011 17:13:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail19b.g19.rapidsite.net (mail19b.g19.rapidsite.net [204.202.242.88]) by mail.postgresql.org (Postfix) with SMTP id F253B1337B84 for ; Mon, 31 Jan 2011 13:13:42 -0400 (AST) Received: from mx90.stngva01.us.mxservers.net (198.173.112.7) by mail19b.g19.rapidsite.net (RS ver 1.0.95vs) with SMTP id 2-0439564022 for ; Mon, 31 Jan 2011 12:13:42 -0500 (EST) Received: from unknown [161.58.75.15] (EHLO mmm1913.dulles19-verio.com) by va1-mx90.stngva01.us.mxservers.net (mxl_mta-3.1.0-05) with ESMTP id 6cde64d4.2077219744.502349.00-018.va1-mx90.stngva01.us.mxservers.net (envelope-from ); Mon, 31 Jan 2011 12:13:42 -0500 (EST) Received: (qmail 88444 invoked from network); 31 Jan 2011 17:13:41 -0000 Received: from unknown (HELO ?192.168.1.184?) (24.5.41.9) by with SMTP; 31 Jan 2011 17:13:41 -0000 Subject: Re: creating and accessing temp table data inside a non-committed transaction Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Leon Starr In-Reply-To: <4D4683EC020000250003A01A@gw.wicourts.gov> Date: Mon, 31 Jan 2011 09:13:41 -0800 Cc: Content-Transfer-Encoding: quoted-printable Message-Id: References: <4D4683EC020000250003A01A@gw.wicourts.gov> To: Kevin Grittner X-Mailer: Apple Mail (2.1082) X-Spam: [F=0.2000000000; S=0.200(2010122901); MH=0.500(2011013121)] X-MAIL-FROM: X-SOURCE-IP: [161.58.75.15] X-SF-Loop: 1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201101/195 X-Sequence-Number: 36635 Oops. Just noticed that I accidentally posted to the wrong group. I = meant to put this in Novice! But thanks anyway! - Leon On Jan 31, 2011, at 7:42 AM, Kevin Grittner wrote: > Leon Starr wrote: >=20 >> 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.=20 >> Right? >=20 > 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? >=20 > Perhaps you could boil the issue down to a small self-contained > example of the issue? >=20 > -Kevin