Moved the postgres library definitions out of here