Re: Locking rows - Mailing list pgsql-general

From Doug McNaught
Subject Re: Locking rows
Date
Msg-id m3n0kgs8xy.fsf@varsoon.wireboard.com
Whole thread Raw
In response to Locking rows  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
Jean-Christian Imbeault <jc@mega-bucks.co.jp> writes:

> I have written an application that prints out data from a
> database. One problem I am encountering is in the time it takes to
> generate the print file the data may have changed.

If you use a single query to generate the rows, this will not be a
problem.

If you use multiple queries, execute them all inside a transaction and
you will get a consistent view of the database.

No locking needed.

-Doug

pgsql-general by date:

Previous
From: Jonathan Bartlett
Date:
Subject: Re: Few Simple Questions
Next
From: "Berend Tober"
Date:
Subject: Some useful plpgsl