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