Support for postgres version < 9