Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make PSQLState enum consts for integrity constraint violations #1699

Conversation

@MSGoodman
Copy link
Contributor

MSGoodman commented Feb 7, 2020

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); this required hardcoding or the creation of consts wherever they were needed (as seen in LogServerMessagePropertyTest.java lines 30 and 47). 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.

All Submissions:

  • [✓] Have you followed the guidelines in our Contributing document?
  • [✓] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Existing Features:

  • [✓] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [✓] Have you written new tests for your core changes, as applicable?
  • [✓] Have you successfully run tests with your changes locally?
root and others added 3 commits Feb 7, 2020
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.
@davecramer davecramer merged commit cc31c13 into pgjdbc:master Feb 7, 2020
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build cancelled
Details
codecov/project 69.08% (+-0.12%) compared to a95b3e5
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
paplorinc added a commit to paplorinc/pgjdbc that referenced this pull request Feb 10, 2020
* origin/master: (427 commits)
  refactor: make PSQLState enum consts for integrity constraint violations (pgjdbc#1699)
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release REL42.2.10
  pass gpg key through arguments
  add passphrase to release mvn task
  chore: update signing key
  Metadata queries improvment (pgjdbc#1694)
  WIP release notes for 42.2.10 (pgjdbc#1688)
  chore(deps): bump checkstyle from 8.28 to 8.29 in /pgjdbc (pgjdbc#1691)
  Cleanup PGProperty, sort values, and add some missing to docs (pgjdbc#1686)
  fix: Fixes issue pgjdbc#1592 where one thread is reading the copy and another thread closes the connection (pgjdbc#1594)
  Fixing LocalTime rounding (losing precision) (pgjdbc#1570)
  sync error message value with tested value (pgjdbc#1664)
  add DatabaseMetaDataCacheTest to test suite to run it (pgjdbc#1685)
  Fix Network Performance of PgDatabaseMetaData.getTypeInfo() method (pgjdbc#1668)
  fix: Issue pgjdbc#1680 updating a boolean field requires special handling to set it to t or f instead of true or false (pgjdbc#1682)
  fix testSetNetworkTimeoutEnforcement test failure (pgjdbc#1681)
  minor: fix checkstyle violation of unused import (pgjdbc#1683)
  fix: pgjdbc#1677 NumberFormatException when fetching PGInterval with small value (pgjdbc#1678)
  fix: actually use milliseconds instead of microseconds for timeouts (pgjdbc#1653)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.