Implement connecting to PostgreSQL

Connecting to PostgreSQL now works, as well as sending the startup
message.