added check for postgres 9.x