fixed insertion into database to use postgres. Insertion now returns the entire row inserted