Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 935C99FBC8C for ; Thu, 31 May 2007 15:57:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 26481-03 for ; Thu, 31 May 2007 15:56:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from beaver.fastcrypt.com (beaver.fastcrypt.com [64.7.141.17]) by postgresql.org (Postfix) with ESMTP id 6629B9FBE0C for ; Thu, 31 May 2007 15:56:57 -0300 (ADT) Received: from [192.168.1.14] (dcdsl.ebox.com [64.7.143.116]) by beaver.fastcrypt.com (Postfix) with ESMTP id 467B21580669; Thu, 31 May 2007 15:06:10 -0400 (EDT) In-Reply-To: References: <66D125B2-3C81-467E-BC02-D784ACDD5499@fastcrypt.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: FYI: porting Copy API to 8.x Date: Thu, 31 May 2007 14:56:57 -0400 To: Kalle Hallivuori X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/71 X-Sequence-Number: 17061 Hi Kalle, On 30-May-07, at 3:45 PM, Kalle Hallivuori wrote: > 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? > I think you have to make it an extension somehow. I'd leave getCopyAPI in place, I think the harder part is getting the protocol to work, > Cheers, > > -- > Kalle Hallivuori +358-41-5053073 http://korpiq.iki.fi/ > > ---------------------------(end of > broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq