Working connection to postgresql