Skip site navigation (1) Skip section navigation (2)

Re: Can I read the data without commit

From: "Jonathan S(dot) Katz" <jonathan(dot)katz(at)excoventures(dot)com>
To: John Fabiani <johnf(at)jfcomputer(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can I read the data without commit
Date: 2012-03-23 21:40:49
Message-ID: F4CA35B7-B59B-4226-BEC4-AA13636F446E@excoventures.com (view raw or flat)
Thread:
Lists: pgsql-sql
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

In response to

Responses

pgsql-sql by date

Next:From: Rob SargentDate: 2012-03-23 21:46:10
Subject: Re: Can I read the data without commit
Previous:From: John FabianiDate: 2012-03-23 21:33:00
Subject: Can I read the data without commit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group