[pgjdbc/pgjdbc] cc31c1: refactor: make PSQLState enum consts forintegrity...
[pgjdbc/pgjdbc] cc31c1: refactor: make PSQLState enum consts forintegrity...
От:
Mike Goodman <noreply@github.com>
Дата:
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: cc31c13f7810e171c54729a29f494d69b7f1550a
https://github.com/pgjdbc/pgjdbc/commit/cc31c13f7810e171c54729a29f494d69b7f1550a
Author: Mike Goodman
Date: 2020-02-07 (Fri, 07 Feb 2020)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/util/PSQLState.java
M pgjdbc/src/test/java/org/postgresql/test/core/LogServerMessagePropertyTest.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/ServerErrorTest.java
Log Message:
-----------
refactor: make PSQLState enum consts for integrity constraint violations (#1699)
* refactor: make PSQLState enum consts for integrity constraint violations
Previously the PSQLState enum did not include values for any of the
integrity constraint violation error codes mentioned in the PostgreSQL
docs (as seen under Class 25 here:
https://www.postgresql.org/docs/current/errcodes-appendix.html); this
required hardcoding or the creation of consts wherever they were needed
(as seen in LogServerMessagePropertyTest.java). This commit adds all of
them (except restrict_violation which doesn't seem to appear in the
wild) and creates a test checking for each of them.