Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5450F6333B9 for ; Fri, 23 Jul 2010 10:24:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 41827-01; Fri, 23 Jul 2010 13:23:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 0E84662E706; Fri, 23 Jul 2010 10:23:57 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 65D9528417; Fri, 23 Jul 2010 09:23:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=n/P1s1l2Gwb70P1xjZyIiKas7JU=; b=1XxMfj VuIxnlM/JrSmGYvWFPqFNkhRmQu87j/I5eDGYvJe7dd2x0s/HhxD6UsITBnMmkk8 //NR94U4n1uw5IGcQSFwm60wwQqynHbAAWlJQxMdEUriqGQjUsad9FtcobCJ9Osg hn0C9ziSJzQOh0gXjl5aeKU5fOY+bwaEBcMAc= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 51F2028415; Fri, 23 Jul 2010 09:23:55 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 19A92A206; Fri, 23 Jul 2010 09:23:55 -0400 (EDT) Date: Fri, 23 Jul 2010 09:23:55 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Robert Haas cc: pgsql-hackers@postgresql.org, Matthew Wakeling , Kevin Grittner , Maciek Sakrejda , Samuel Gendler , pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] Trouble with COPY IN In-Reply-To: Message-ID: References: <4C4562C50200002500033951@gw.wicourts.gov> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/89 X-Sequence-Number: 20754 On Thu, 22 Jul 2010, Robert Haas wrote: > On Thu, Jul 22, 2010 at 5:34 PM, Kris Jurka wrote: >> >> Attached is a patch to make the server continue to consume protocol data >> until instructed to stop by the client in the same way as copying text data >> to the server currently works. >> > > I guess the obvious question is whether we shouldn't instead change > the docs to match the behavior. I suspect there's almost no chance > we'd consider back-patching a change of this type, since it is a clear > behavior change. And even if we did, there would still be people > running servers with the old behavior with which JDBC and other > drivers would have to cope. Having two different behaviors might be > worse than the status quo. > It is a clear behavior change, but that's what bug fixes are. I would advocate back-patching this because I doubt many people would be affected by this change and I think it would be awkward trying to document how things work differently in binary mode when sending a file end marker than in text mode or without a file end marker. If this was fixed server side and backpatched, I would not modify the JDBC driver to work with older server versions. The copy documentation is clear that you must call PQputCopyEnd or equivalent to end the copy sequence, so this would only affect people who are not doing that and using binary copy mode. I doubt many people are using binary copy at all because of the additional difficulty in generating binary format data and the potential for portability problems. Kris Jurka