X-Original-To: pgsql-general@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A4F6C474E44 for ; Sat, 1 Mar 2003 08:39:46 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 22940-04 for ; Sat, 1 Mar 2003 08:39:45 -0500 (EST) Received: from mx1.eskimo.com (mx1.eskimo.com [204.122.16.48]) by postgresql.org (Postfix) with ESMTP id DF639474E42 for ; Sat, 1 Mar 2003 08:39:44 -0500 (EST) Received: from eskimo.com (johnnyb@eskimo.com [204.122.16.13]) by mx1.eskimo.com (8.9.1a/8.8.8) with ESMTP id FAA23140; Sat, 1 Mar 2003 05:39:46 -0800 Received: from localhost (johnnyb@localhost) by eskimo.com (8.9.1a/8.9.1) with ESMTP id FAA09957; Sat, 1 Mar 2003 05:39:47 -0800 (PST) X-Authentication-Warning: eskimo.com: johnnyb owned process doing -bs Date: Sat, 1 Mar 2003 05:39:47 -0800 (PST) From: Jonathan Bartlett To: Jean-Christian Imbeault Cc: pgsql-general@postgresql.org Subject: Re: Locking rows In-Reply-To: <3E602D76.6060204@mega-bucks.co.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/4 X-Sequence-Number: 38496 > > No. While I gather the data necessary to print a receipt I mark the > invoice as non-cancellable. > Why don't you have two fields - non-cancellable and printed. In transaction A, you mark everything you want to print as non-cancellable. In transaction B, you query for everything that is not printed AND non-cancellable, and print it, and then update those same records as being printed. In addition, you probably want to turn on the maximum isolation level to fully prevent rewriting records. Jon > In other words, I want to make invoices that have had receipts printed > no longer cancellable. > > Jc >