Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 15CC79FA467 for ; Mon, 2 Apr 2007 23:23:18 -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 75034-08 for ; Mon, 2 Apr 2007 23:23:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 8AA5E9FB794 for ; Mon, 2 Apr 2007 23:23:14 -0300 (ADT) Received: from 222-154-130-131.jetstream.xtra.co.nz ([222.154.130.131] helo=[10.1.1.3]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1HYYft-0001dn-LT; Tue, 03 Apr 2007 14:23:09 +1200 Message-ID: <4611BA97.4060400@opencloud.com> Date: Tue, 03 Apr 2007 14:23:19 +1200 From: Oliver Jowett User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Kevin Murphy CC: pgsql-jdbc@postgresql.org, nwakefield@kineticnetworks.com Subject: Re: psql COPY with JDBC References: <46110BBF.10806@genome.chop.edu> In-Reply-To: <46110BBF.10806@genome.chop.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/3 X-Sequence-Number: 16852 Kevin Murphy wrote: > Also: I haven't seen evidence of a JDBC prepared statement approach for > 8.2's multiple-row INSERTs (using multiple VALUES arguments). Does such > a beast exist, or will it? I assume you can do this without driver changes by preparing a suitable statement. Presumably you'd do something like prepare a 20-row-insert statement, use it until you have less than 20 rows left, then prepare and use single-row-inserts for the remainder. > Also: what exactly does the PostgreSQL driver do with INSERTs that are > batched with addBatch? I must confess I haven't tried this yet. It prepares them once and sends a pair of Bind/Execute messages for each set of parameter values, with a Sync at the end. You can see the details with loglevel=2 -O