Dear Adrian,
I appreciate your reply. Your reply gave me a new idea,
it should not be the problem that the lower() function causes the unique index to fail.
I checked the postgresql.conf file and found that shared_buffers, work_mem and maintenance_work_mem are default value,
but in the postgresql.conf file of PostgreSQL 8.4, the value of these parameters are very large.
When I changed the value of these parameters to a larger value, the problem solved.