Updated for PostgreSQL 9.3