pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Doug McNaught <doug@mcnaught.org>
To: Jean-Christian Imbeault <jc@mega-bucks.co.jp>
Cc: PostgreSQL-general <pgsql-general@postgreSQL.org>
Subject: Re: Locking rows
Date: 28 Feb 2003 10:48:09 -0500
Message-ID: <m3n0kgs8xy.fsf@varsoon.wireboard.com> (raw)
References: <3E5F396F.4090507@mega-bucks.co.jp>

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



view thread (19+ messages)  latest in thread

Message-ID: <m3n0kgs8xy.fsf@varsoon.wireboard.com>
Permalink:  ../m3n0kgs8xy.fsf@varsoon.wireboard.com/
Also on:    postgresql.org/message-id/m3n0kgs8xy.fsf@varsoon.wireboard.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: doug@mcnaught.org, jc@mega-bucks.co.jp
  Subject: Re: Locking rows
  In-Reply-To: <m3n0kgs8xy.fsf@varsoon.wireboard.com>
  References: <3E5F396F.4090507@mega-bucks.co.jp> <m3n0kgs8xy.fsf@varsoon.wireboard.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox