test=# create table source (name text);
CREATE TABLE
Time: 4,170 ms
test=*# create table destination (name text unique);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "destination_name_key" for table "destination"
CREATE TABLE
Time: 46,440 ms
test=*# insert into destination values ('name1');
INSERT 0 1
Time: 0,475 ms
test=*# insert into destination values ('name3');
INSERT 0 1
Time: 0,156 ms
test=*# insert into source select 'name' || s::text from generate_Series(1,5) s;
INSERT 0 5
Time: 58,336 ms
test=*# insert into destination select name from source except select name from destination;
INSERT 0 3
Time: 0,600 ms
test=*#