PostgreSQL minor fixes