PostgreSQL errors?

the second problem:
duplicate key

is being discussed here too: