Skip site navigation (1) Skip section navigation (2)

Re: Inserting 'large' amounts of data

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inserting 'large' amounts of data
Date: 2009-08-27 00:03:44
Message-ID: 895e58dd0908261703v1a93d2d2p5b69deffebd794da@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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(at)truviso(dot)com
www.truviso.com

In response to

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2009-08-27 00:07:39
Subject: Re: PGStream synchronization
Previous:From: Kris JurkaDate: 2009-08-26 23:59:47
Subject: Re: Inserting 'large' amounts of data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group