Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 33E981336705 for ; Sat, 18 Sep 2010 17:16:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 67411-04 for ; Sat, 18 Sep 2010 20:15:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id B69221335B36 for ; Sat, 18 Sep 2010 17:15:54 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o8IKFjq5018985; Sat, 18 Sep 2010 16:15:45 -0400 (EDT) To: Kris Jurka cc: James William Pye , pgsql-hackers@postgresql.org, Matthew Wakeling , Kevin Grittner , Maciek Sakrejda , Samuel Gendler , pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Trouble with COPY IN In-reply-to: References: <4C4562C50200002500033951@gw.wicourts.gov> <9143.1279892435@sss.pgh.pa.us> <4C499E26.4060307@ejurka.com> <9653.1279894296@sss.pgh.pa.us> <7E743A09-D012-4BBB-9B87-24CA1DF51015@jwp.name> <41218459-EDA4-4005-B791-2392991150AC@jwp.name> <0448ABED-5F22-4EE5-95F5-A7917B25EFB6@jwp.name> Comments: In-reply-to Kris Jurka message dated "Mon, 09 Aug 2010 14:49:04 -0400" Date: Sat, 18 Sep 2010 16:15:45 -0400 Message-ID: <18984.1284840945@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/1049 X-Sequence-Number: 169913 Kris Jurka writes: >> On Fri, 6 Aug 2010, James William Pye wrote: >>> I think there's a snag in the patch: > Oh, duh. It's a server side copy not going through the client at all. > Here's a hopefully final patch. Applied with a correction: this would've totally broken binary copy in old-style protocol, because there is no other EOF marker except the -1 in that case. BTW, it strikes me that we could reduce the backwards-compatibility impact of this patch if we made it ignore, rather than throw error for, any extra data after the EOF marker. I left it as-is since ISTM the more error checking you can have in a binary data format, the better. But a case could be made for doing the other thing, especially if somebody wanted to argue for back-patching this. regards, tom lane