Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 75DBA9FC124 for ; Wed, 30 May 2007 16:45:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26616-02-4 for ; Wed, 30 May 2007 16:45:26 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by postgresql.org (Postfix) with ESMTP id 968389FC0C6 for ; Wed, 30 May 2007 16:45:13 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so733065ana for ; Wed, 30 May 2007 12:45:08 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=k/E7M3EhoJi/BEYXwfSCXIcJMV1qzYFZlI5CgnLLDhRclnz+tEScmqnEAiMHrrb9jbY6BB+oTtDP4DKMuiWDaEEkWr6ES65J5K0z1+2uX6aYCjQWla47vtq1DFo+kD5JzwcY4W/bSQ5kRqMMEXm348pZMUcTHlfFOiIKW8/zC0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=HTLE0Cp8ofna7whv09jbOiUyWR4uKyWDNit+AU2XPnZUj/02+o6VsHP8kk4Uw8QpNc2SKhfvQcpEfUXyi2rqcdkHsf1xuMyVkJ48aFg+Yvh8GNzsA0YUZ6lLHQBvvlBOLNyOncj6Im7FcXBiljGvR8GEHJ97YPTSZ7W/B0one6M= Received: by 10.114.15.1 with SMTP id 1mr4232308wao.1180554304259; Wed, 30 May 2007 12:45:04 -0700 (PDT) Received: by 10.114.147.16 with HTTP; Wed, 30 May 2007 12:45:04 -0700 (PDT) Message-ID: Date: Wed, 30 May 2007 22:45:04 +0300 From: "Kalle Hallivuori" To: "Dave Cramer" Subject: Re: FYI: porting Copy API to 8.x Cc: pgsql-jdbc@postgresql.org In-Reply-To: <66D125B2-3C81-467E-BC02-D784ACDD5499@fastcrypt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <66D125B2-3C81-467E-BC02-D784ACDD5499@fastcrypt.com> X-Google-Sender-Auth: 2f04e5cea17b2566 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/69 X-Sequence-Number: 17059 Hi Dave! 2007/5/30, Dave Cramer : > The reason that the patch has never been officially accepted is > because it creates two protocol paths. > > To do this correctly you need to add the copy functionality into the > current protocol handler as opposed to having a separate protocol > handler for copy. Thanks, now I understand why it's not there. I can take a look at alternative approaches tomorrow, and only go with the ugly one if I don't come up with an (moderately easily implementable) acceptable design. Is it more of an open design problem that many people have looked closely into, or rather just a matter of someone getting to it? Ie. is it likely there is no clean way to add these special cases inside the protocol handler? As for redesign, which would be the least abhorred way of providing the functionality for use: 1. Separate Copy API available via a getCopyAPI() method in PGConnection API? 2. Separate Copy API available with some cleaner approach, which? 3. Special Copy methods in PGConnection API? 4. Special cases to batch processing (FROM STDIN) and resultset collecting (TO STDOUT)? 5. Special cases to some other part of the standard JDBC API, which? Cheers, -- Kalle Hallivuori +358-41-5053073 http://korpiq.iki.fi/