fix for postgres 9.1