Completed the postgresql assignment