Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9993E633F01 for ; Thu, 8 Apr 2010 12:19:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 42826-04-3 for ; Thu, 8 Apr 2010 15:18:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f185.google.com (mail-qy0-f185.google.com [209.85.221.185]) by mail.postgresql.org (Postfix) with ESMTP id C3C686327E6 for ; Thu, 8 Apr 2010 12:15:14 -0300 (ADT) Received: by qyk15 with SMTP id 15so113370qyk.10 for ; Thu, 08 Apr 2010 08:14:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.100.72 with HTTP; Thu, 8 Apr 2010 08:14:47 -0700 (PDT) In-Reply-To: <151556.7059.qm@web29010.mail.ird.yahoo.com> References: <234987.48841.qm@web29001.mail.ird.yahoo.com> <151556.7059.qm@web29010.mail.ird.yahoo.com> Date: Thu, 8 Apr 2010 08:14:47 -0700 Received: by 10.229.212.213 with SMTP id gt21mr457282qcb.2.1270739687721; Thu, 08 Apr 2010 08:14:47 -0700 (PDT) Message-ID: Subject: Re: Problem with copyIn(String sql, Reader from) From: Maciek Sakrejda To: Leonardo F Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201004/10 X-Sequence-Number: 20421 I think you're (sort of) right. With the current approach, I think we risk writing garbage to the COPY when we reach the end of the Reader. Your proposed solution should work. --- Maciek Sakrejda | Software Engineer | Truviso 1065 E. Hillsdale Blvd., Suite 230 Foster City, CA 94404 (650) 242-3500 Main (650) 242-3501 F www.truviso.com