Add unique keys check to postgres
Merge pull request #2806 from seegno/bugfix/add-unique-keys-check

Add unique keys check to postgres