connects to postgresql