Re: Writing results while loop ongoing?

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: James David Smith <james(dot)david(dot)smith(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Writing results while loop ongoing?
Date: 2013-09-04 13:35:02
Message-ID: 1378301702.56603.YahooMailNeo@web162903.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

James David Smith <james(dot)david(dot)smith(at)gmail(dot)com> wrote:

> the functions always goes through the entire data. However it
> only write the data to the results table at the end. Is this
> normal?

It is normal that the work of a transaction is not visible until
and unless that transaction commits.  Execution of a function is
always part of a single transaction.

> Could it not write the data to the results table after it's made
> each request?

It does; but the data does not become visible outside the
transaction writing the data unless the transaction commits.

http://en.wikipedia.org/wiki/ACID#Atomicity

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message James David Smith 2013-09-04 17:48:16 Re: Writing results while loop ongoing?
Previous Message Merlin Moncure 2013-09-04 13:27:00 Re: Writing results while loop ongoing?