Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3FCB6634B25 for ; Wed, 26 Aug 2009 14:34:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 62463-02 for ; Wed, 26 Aug 2009 17:34:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mail.postgresql.org (Postfix) with ESMTP id EDAB963270B for ; Wed, 26 Aug 2009 14:34:33 -0300 (ADT) Received: by ey-out-2122.google.com with SMTP id 25so77945eya.33 for ; Wed, 26 Aug 2009 10:34:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.210.27.20 with SMTP id a20mr4241973eba.28.1251308072519; Wed, 26 Aug 2009 10:34:32 -0700 (PDT) In-Reply-To: <4A9562BC.8030804@megafon.hr> References: <4A9562BC.8030804@megafon.hr> Date: Wed, 26 Aug 2009 10:34:32 -0700 Message-ID: <895e58dd0908261034y3887469agd8fdc62918f6be50@mail.gmail.com> Subject: Re: Inserting 'large' amounts of data From: Maciek Sakrejda To: Mario Splivalo Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.67 tagged_above=-10 required=5 tests=AWL=-0.930, BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200908/64 X-Sequence-Number: 19913 Right. As of the 8.4 release, you have a jdbc API to the postgresql COPY functionality. Cast your Connection to a PGConnection and call .getCopyAPI(). You can then use the CopyManager[1] to copy data in from your tomcat servlet. [1] http://jdbc.postgresql.org/documentation/publicapi/org/postgresql/copy/CopyManager.html -- Maciek Sakrejda | Software Engineer | Truviso (650) 242-3500 Main (650) 242-3501 F msakrejda@truviso.com www.truviso.com