X-Original-To: pgsql-general@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 128684761EA for ; Fri, 28 Feb 2003 11:59:42 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 69642-09 for ; Fri, 28 Feb 2003 11:59:31 -0500 (EST) Received: from varsoon.wireboard.com (www.wireboard.com [216.151.155.101]) by postgresql.org (Postfix) with ESMTP id 0EFE747624C for ; Fri, 28 Feb 2003 10:48:18 -0500 (EST) Received: from doug by varsoon.wireboard.com with local (Exim 3.35 #1) id 18omk5-0002vZ-00; Fri, 28 Feb 2003 10:48:09 -0500 To: Jean-Christian Imbeault Cc: PostgreSQL-general Subject: Re: Locking rows References: <3E5F396F.4090507@mega-bucks.co.jp> From: Doug McNaught Date: 28 Feb 2003 10:48:09 -0500 In-Reply-To: Jean-Christian Imbeault's message of "Fri, 28 Feb 2003 19:26:55 +0900" Message-ID: Lines: 15 User-Agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/1701 X-Sequence-Number: 38455 Jean-Christian Imbeault 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