kore postgresql dependency fix

This makes postgresql an optional dependency.
Yes, please. ;) Sorry to be long-winded.