2QGIS implements its own PostgreSQL functions. OGR should be built without PostgreSQL support