Make compatible with https://github.com/Enelar/pgsql_php