Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D4E129FB310 for ; Fri, 8 Jun 2007 08:05:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 13340-10 for ; Fri, 8 Jun 2007 08:05:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by postgresql.org (Postfix) with ESMTP id 2A86D9FB4DC for ; Fri, 8 Jun 2007 08:05:44 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 25so772538wry for ; Fri, 08 Jun 2007 04:05:42 -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:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=shsk/MShs5jiPH4Y5s5GHDpiPNIz9cpTe5I4907LWV+MPNRX3GbWDsrXor2E/ZI8PYXwmdqX+HBmV/L1UjDFO2+Fb2BdZwxIX8KkCSo3AHPUyKAKQ2Xlcphv0D2ONqqVq78Ged0zk/iGfLcZsBKI2gTAfC7I9pqseCbEP+wNR+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=GtjyXr5VJtjnbrVHADOv2PwfiXFK8uT7x80dCMxnj7kFTRmPZ6aEtVgFK5lfHPiSbiMMQT1hNJs4AsD7IKB9TJIEBDpfi0a4mRcchcc+EKJ/Fakj82gZ+5L4T3vITvfy7O/VHnqL0xXsHucB+ZhSf5+Z3BRp/5HdXSrvHIw1UVI= Received: by 10.115.16.1 with SMTP id t1mr2453889wai.1181300741295; Fri, 08 Jun 2007 04:05:41 -0700 (PDT) Received: by 10.114.151.9 with HTTP; Fri, 8 Jun 2007 04:05:41 -0700 (PDT) Message-ID: Date: Fri, 8 Jun 2007 14:05:41 +0300 From: "Kalle Hallivuori" Subject: Re: FYI: porting Copy API to 8.x Cc: pgsql-jdbc@postgresql.org In-Reply-To: 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: cbbb6992be58592b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/36 X-Sequence-Number: 17098 Hi again. I have an implementation of COPY subprotocol support that is implemented inside org.postgresql.core.v3.QueryExecutorImpl and used via a clean API available from PGConnection.getCopyAPI(). I'm trying to test it today and commit the patch next week. To ensure inclusion in the official source, I tried to follow the way Fastpath was implemented. In this implementation a COPY SQL statement is executed normally, after which the response from server initiating COPY subprotocol is handled in the usual processResults(). After that, specific methods must be used to exchange copydata with the server and return to normal protocol. All responses from server during that time are handled in a separate private processCopyResults() method. Alternatively processCopyResults() could be merged into processResults() or separate everything COPY-related from there, keeping it as it was. Opinions? -- Kalle Hallivuori +358-41-5053073 http://korpiq.iki.fi/