Babelfish returns 2601 - Cannot insert duplicate key row in object '%.*ls' with unique index '%.*ls'.

0

I'm receiving this error when I should get a 2627 for unique constraints violation. Please help.

AWS
light
질문됨 2년 전262회 조회
1개 답변
0
수락된 답변

With SQL Server there are 2 distinct errors for uniqueness violation, 2601 for unique index violation and 2627 for unique constraint violation. PostgreSQL don't have different error codes for unique index vs unique constraint violations, that's why, currently, in Babelfish both are mapped to SQL error 2627, as of June 30, 2022. As Babelfish is improved, correct mapping of both errors will be added. The recommended approach is to catch both errors: 2627 and 2601 so that your code will work with future versions of Babelfish.

AWS
light
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠