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