pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Fabiani <johnf@jfcomputer.com>
To: pgsql-sql@postgresql.org
Subject: Re: Can I read the data without commit
Date: Fri, 23 Mar 2012 14:49:41 -0700
Message-ID: <2083844.g5gOAHDHN5@linux-12> (raw)
In-Reply-To: <4F6CEF22.5040205@gmail.com>
References: <2388789.tLQtTxa0cR@linux-12>
	<F4CA35B7-B59B-4226-BEC4-AA13636F446E@excoventures.com>
	<4F6CEF22.5040205@gmail.com>

Yes I understand - but I want to know is it possible?  Can I read the data I 
just inserted without a commit.
Johnf
On Friday, March 23, 2012 03:46:10 PM Rob Sargent wrote:
> If possible have the review done before starting the transaction.  No
> sense in holding on to that stuff too long. Potential concurrency issues
> etc.
> 
> On 03/23/2012 03:40 PM, Jonathan S. Katz wrote:
> > On Mar 23, 2012, at 5:33 PM, John Fabiani wrote:
> >> I start a transaction.
> >> Begin
> >> 
> >> Then I insert a lot of data - let's say two hundred rows.
> >> 
> >> Now I need to read the same data (so the user can review).
> >> 
> >> If the user thinks all is right then
> >> commit.
> >> 
> >> Can I read the data I just inserted without committing?
> > 
> > Yes, as long as you run your SELECT within the transaction that you
> > started.
> > 
> > Jonathan



view thread (7+ messages)  latest in thread

Message-ID: <2083844.g5gOAHDHN5@linux-12>
Permalink:  ../2083844.g5gOAHDHN5@linux-12/
Also on:    postgresql.org/message-id/2083844.g5gOAHDHN5@linux-12

 · 

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-sql@postgresql.org
  Cc: johnf@jfcomputer.com
  Subject: Re: Can I read the data without commit
  In-Reply-To: <2083844.g5gOAHDHN5@linux-12>

* 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