Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 608B36354BE for ; Wed, 26 Aug 2009 21:04:13 -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 37173-03 for ; Thu, 27 Aug 2009 00:03:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f216.google.com (mail-ew0-f216.google.com [209.85.219.216]) by mail.postgresql.org (Postfix) with ESMTP id ED08F6354CC for ; Wed, 26 Aug 2009 21:03:46 -0300 (ADT) Received: by ewy12 with SMTP id 12so829425ewy.24 for ; Wed, 26 Aug 2009 17:03:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.210.27.20 with SMTP id a20mr4688499eba.28.1251331424975; Wed, 26 Aug 2009 17:03:44 -0700 (PDT) In-Reply-To: <4A95CB7F.7060006@hogranch.com> References: <4A9562BC.8030804@megafon.hr> <4A956E17.9020607@hogranch.com> <4A95B674.2020103@megafon.hr> <4A95CB7F.7060006@hogranch.com> Date: Wed, 26 Aug 2009 17:03:44 -0700 Message-ID: <895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com> Subject: Re: Inserting 'large' amounts of data From: Maciek Sakrejda To: John R Pierce 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.855 tagged_above=-10 required=5 tests=AWL=-0.745, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 200908/69 X-Sequence-Number: 19918 In the same manner as regular DML--you'll get a constraint violation: cqdb=# create table foo(a int unique); NOTICE: CREATE TABLE / UNIQUE will create implicit index "foo_a_key" for table "foo" CREATE TABLE cqdb=# copy foo from stdin; Enter data to be copied followed by a newline. End with a backslash and a period on a line by itself. >> 1 >> 1 >> 1 >> \. ERROR: duplicate key value violates unique constraint "foo_a_key" CONTEXT: COPY foo, line 2: "1" (This is straight through psql, but essentially the same thing would happen through jdbc). -- Maciek Sakrejda | Software Engineer | Truviso (650) 242-3500 Main (650) 242-3501 F msakrejda@truviso.com www.truviso.com