lib/pq is out of maintenance for some time now, so switch to the newer more active library. Looks like it finally stabilized after a long time.
This is the import from the separate monfront repository. The history could not be imported, but this should suffice.