[Theia] Add support to PostgreSQL < 9.0