Final postgres integration