Fix compability with PostgreSQL 8.4