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