Fix to PostgreSQL support