Some improvements for PostgreSQL 9.3.1