#833 Add support for PostgreSQL 8 and higher