Useful PostgreSQL utilities