pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Can I read the data without commit
Date: Fri, 23 Mar 2012 16:00:56 -0600
Message-ID: <4F6CF298.5070600@gmail.com> (raw)
In-Reply-To: <2083844.g5gOAHDHN5@linux-12>
References: <2388789.tLQtTxa0cR@linux-12>
	<F4CA35B7-B59B-4226-BEC4-AA13636F446E@excoventures.com>
	<4F6CEF22.5040205@gmail.com>
	<2083844.g5gOAHDHN5@linux-12>

And I believe Jonathon confirmed that you could, with the caveat that 
you must select from within the transaction. I don't see that you've 
laid that out your connection stategy so ymmv.

On 03/23/2012 03:49 PM, John Fabiani wrote:
> 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: <4F6CF298.5070600@gmail.com>
Permalink:  ../4F6CF298.5070600@gmail.com/
Also on:    postgresql.org/message-id/4F6CF298.5070600@gmail.com

 · 

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: robjsargent@gmail.com
  Subject: Re: Can I read the data without commit
  In-Reply-To: <4F6CF298.5070600@gmail.com>

* 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