pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Leon Starr <leon_starr@modelint.com>
To: pgsql-admin@postgresql.org
Subject: Re: creating and accessing temp table data inside a non-committed transaction
Date: Mon, 31 Jan 2011 09:42:04 -0600
Message-ID: <4D4683EC020000250003A01A@gw.wicourts.gov> (raw)
In-Reply-To: <FC69D86A-2486-4967-84C5-1E97BDC12E80@modelint.com>
References: <FC69D86A-2486-4967-84C5-1E97BDC12E80@modelint.com>

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



view thread (4+ messages)  latest in thread

Message-ID: <4D4683EC020000250003A01A@gw.wicourts.gov>
Permalink:  ../4D4683EC020000250003A01A@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4D4683EC020000250003A01A@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, leon_starr@modelint.com
  Subject: Re: creating and accessing temp table data inside a non-committed transaction
  In-Reply-To: <4D4683EC020000250003A01A@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox