Got postgres opening working by doing all the driver work in main() so we can keep a local reference to driver. This is a weird OGR quirk