Setting primary key
Updates to postgres SQL
Simplifying Postgres syntax