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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

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