To provide machine-readeble SQLIntegrityConstraintViolationException. Required schema name, table name, constraint name. #2533
Labels
Backlog
The topic in question has been recognized and added to development backlog
Enhancement
An enhancement to the driver. Lower priority than bugs.
Driver version
latest
SQL Server version
mcr.microsoft.com/mssql/server:2022-latest
Client Operating System
any
JAVA/JVM version
any
Table schema
Some constraint, i.e. unique index
Problem description
MSSQL jdbc driver does not provide machine-readeble SQLIntegrityConstraintViolationException.
Expected behavior
Convinient ConstraintViolationException instance with fields: schema name, table name, constraint name like in PG:
Actual behavior
The hard way (and fragile solution):
Error message/stack trace
No
Any other details that can be helpful
Obviously in PG not a perfect solution, but at least this way:
https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/util/PSQLException.html#getServerErrorMessage--
JDBC trace logs
No
The text was updated successfully, but these errors were encountered: