Re: creating and accessing temp table data inside a non-committed transaction - Mailing list pgsql-admin

From Leon Starr
Subject Re: creating and accessing temp table data inside a non-committed transaction
Date
Msg-id E103F6C7-3FF9-46E6-B42F-1D7A3EA09B82@modelint.com
Whole thread Raw
In response to Re: creating and accessing temp table data inside a non-committed transaction  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
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 <leon_starr@modelint.com> 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



pgsql-admin by date:

Previous
From: Leon Starr
Date:
Subject: Re: creating and accessing temp table data inside a non-committed transaction
Next
From: "Bradley Holbrook"
Date:
Subject: Re: Drop Schema Error