pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Maciek Sakrejda <msakrejda@truviso.com>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Inserting 'large' amounts of data
Date: Wed, 26 Aug 2009 17:03:44 -0700
Message-ID: <895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com> (raw)
In-Reply-To: <4A95CB7F.7060006@hogranch.com>
References: <4A9562BC.8030804@megafon.hr>
	<4A956E17.9020607@hogranch.com>
	<4A95B674.2020103@megafon.hr>
	<alpine.BSO.2.00.0908261832270.9081@leary.csoft.net>
	<4A95CB7F.7060006@hogranch.com>

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



view thread (10+ messages)  latest in thread

Message-ID: <895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com>
Permalink:  ../895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com/
Also on:    postgresql.org/message-id/895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: msakrejda@truviso.com, pierce@hogranch.com
  Subject: Re: Inserting 'large' amounts of data
  In-Reply-To: <895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com>
  References: <4A9562BC.8030804@megafon.hr> <4A956E17.9020607@hogranch.com> <4A95B674.2020103@megafon.hr> <alpine.BSO.2.00.0908261832270.9081@leary.csoft.net> <4A95CB7F.7060006@hogranch.com> <895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox