Обсуждение: Duplicate Key Error Message Very Vague

Поиск
Список
Период
Сортировка

Duplicate Key Error Message Very Vague

От
"Campbell, Lance"
Дата:

Duplicate Key Error Message Very Vague,

 

I got the following message when doing an update:

 

duplicate key violates unique constraint "user_role_pkey"

 

Is there a reason PostgreSQL could not be modified to tell us the values of the keys so we could then trouble shoot the issue?

 

Example:  If the primary field was field1 and field2 then the error message would say:

 

duplicate key violates unique constraint "user_role_pkey", values of 123, ‘abcd’ were used.

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu