Adjusts to postgresql