Re: Writing results while loop ongoing? - Mailing list pgsql-novice

From Kevin Grittner
Subject Re: Writing results while loop ongoing?
Date
Msg-id 1378301702.56603.YahooMailNeo@web162903.mail.bf1.yahoo.com
Whole thread Raw
In response to Writing results while loop ongoing?  (James David Smith <james.david.smith@gmail.com>)
Responses Re: Writing results while loop ongoing?
List pgsql-novice
James David Smith <james.david.smith@gmail.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


pgsql-novice by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Writing results while loop ongoing?
Next
From: James David Smith
Date:
Subject: Re: Writing results while loop ongoing?