Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id F41C3C14E5E for ; Fri, 23 Mar 2012 18:45:26 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SBCIX-0003ML-Un for pgsql-sql@postgresql.org; Fri, 23 Mar 2012 21:45:26 +0000 Received: by pbcun15 with SMTP id un15so2897917pbc.19 for ; Fri, 23 Mar 2012 14:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=p8h8QkxtaXePxd7sZouPKHjFvpXLRK9iEKcDnLl4rnI=; b=YdrGIgmQEi/+CY37PT/Pk5M0x9D6VPVSjEL4XVxk/m1OY3Z8q9dvaKEXJ74Qjyneop vSWnaEJH6ZCPo958Zf/DnH+Q+vwvaD6V9f5ebZ1XMUZS6ib3T22vFxcRtHm8jGUQx+J/ 3n6TlpYlPBkgoonmLstOnGahTSbAp2t2eWOooiZfthVSXqQJ8S2Z9WkMGkSE+qpMeyPv QgbRF9FeFjmKvGsjWq75PfTCnuDE+PfGCQb7jeceUB5Bhh+9pNb12nIKKy1QPirNpfuC iHJhhouxyIyRZh1OtYQh7S41l7fJforwdiv1rSF2yKQfK5DmVUZPsHq1P9vlHyltyozs UDqw== Received: by 10.68.195.3 with SMTP id ia3mr32635506pbc.20.1332539113308; Fri, 23 Mar 2012 14:45:13 -0700 (PDT) Received: from [172.16.1.224] ([208.187.158.94]) by mx.google.com with ESMTPS id q8sm6611521pbi.1.2012.03.23.14.45.11 (version=SSLv3 cipher=OTHER); Fri, 23 Mar 2012 14:45:12 -0700 (PDT) Message-ID: <4F6CEF22.5040205@gmail.com> Date: Fri, 23 Mar 2012 15:46:10 -0600 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Can I read the data without commit References: <2388789.tLQtTxa0cR@linux-12> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201203/66 X-Sequence-Number: 36461 If possible have the review done before starting the transaction. No sense in holding on to that stuff too long. Potential concurrency issues etc. On 03/23/2012 03:40 PM, Jonathan S. Katz wrote: > On Mar 23, 2012, at 5:33 PM, John Fabiani wrote: > >> I start a transaction. >> Begin >> >> Then I insert a lot of data - let's say two hundred rows. >> >> Now I need to read the same data (so the user can review). >> >> If the user thinks all is right then >> commit. >> >> Can I read the data I just inserted without committing? > > Yes, as long as you run your SELECT within the transaction that you started. > > Jonathan >