X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1BCB652B46 for ; Fri, 19 Aug 2005 09:07:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88221-03 for ; Fri, 19 Aug 2005 12:07:18 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 9C2DD52B71 for ; Fri, 19 Aug 2005 09:07:16 -0300 (ADT) Received: (qmail 7607 invoked from network); 19 Aug 2005 12:07:19 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 19 Aug 2005 12:07:19 -0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <926F22A7-1948-450A-824B-EED4D5185C61@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: COPY support survey Date: Fri, 19 Aug 2005 08:07:17 -0400 To: Kris Jurka X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 required=5 tests=[AWL=0.013] X-Spam-Level: X-Archive-Number: 200508/135 X-Sequence-Number: 13704 I would vote for 3.I already have ported your patch over to the (near) current code and it is being used by a few people and from what I understand quite stable. If you want I can fix this up and commit it. Dave On 19-Aug-05, at 3:03 AM, Kris Jurka wrote: > > On and off there's been discussions of getting COPY support into > the JDBC driver and I produced a patch to provide a stream based > interface over a year and a half ago [1]. At the time we did not > commit that because we had grand plans to provide a friendly > interface to users so they did not have to know the internals of > how COPY actually represents data. This mostly happened off-list > between Oliver and I, but the key suggestion is available here > [2]. This allows you to use SQLOutput [3] calls like > writeTimestamp or writeArray to directly send Java objects to the > database without having to know the Postgresql specific text > representation of them. This turned out to be harder and more > involved than it looked and I just let the patch languish, always > intending to return to it, but as time has passed I've actually had > less time to dedicate to the driver instead of more. > > I know a number of people are already/still using the original > patch I provided, but at the same time they have also (indirectly) > indicated that some additional support is needed [4]. > > So the question is what should we do? > > 1) Just get the raw stream interface into the official release and > let the end user deal with reading and writing the stream. That's > all I'll use and I don't care about anything else. > > 2) Don't give up, get the friendly SQLInput/SQLOutput interface in > because this is what I really want. > > 3) Put in the raw stream interface, but keep working to also add > the friendly one. I'll understand if the interface changes and I > have to modify my code a bit. > > Kris Jurka > > [1] http://archives.postgresql.org/pgsql-jdbc/2003-12/msg00186.php > [2] http://www.ejurka.com/pgsql/copy/doc/sqlinputoutput.txt > [3] http://java.sun.com/j2se/1.4.2/docs/api/java/sql/SQLOutput.html > [4] http://archives.postgresql.org/pgsql-jdbc/2004-06/msg00165.php > > ---------------------------(end of > broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > >