[12628] Fix PostgreSQL bindings and add support to build directly with PostgreSQL instead of MySQL.