[pgjdbc/pgjdbc] cc31c1: refactor: make PSQLState enum consts for integrity...

From: Mike Goodman <noreply(at)github(dot)com>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] cc31c1: refactor: make PSQLState enum consts for integrity...
Date: 2020-02-07 14:58:13
Message-ID: pgjdbc/pgjdbc/push/refs/heads/master/a95b3e-cc31c1@github.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: cc31c13f7810e171c54729a29f494d69b7f1550a
https://github.com/pgjdbc/pgjdbc/commit/cc31c13f7810e171c54729a29f494d69b7f1550a
Author: Mike Goodman <MSGoodman(at)users(dot)noreply(dot)github(dot)com>
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.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Magnus Reftel 2020-02-10 14:16:07 [pgjdbc/pgjdbc] 8a8e8f: docs: document SocketFactory(Properties) (#1696)
Previous Message Dave Cramer 2020-02-06 22:58:16 42.2.10 released