From: | "David Kremer" <jkorders(at)gmx(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Java's org.postgresql.util.PSQLState is missing common PostgreSQL Error Codes |
Date: | 2019-01-30 21:09:02 |
Message-ID: | trinity-14a6c24a-98b1-4953-aa11-4dbc1546a74f-1548882542034@3c-app-mailcom-bs06 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
In my Java API server, I am using SERIALIZABLE transaction isolation mode, so I'm specially handling the error code of "40001 serialization_failure", which can occur often. I'm getting the error code String using SQLException's getSQLState() function.
Therefore I was surprised to see that the Java enum org.postgresql.util.PSQLState does not include this error code.
PSQLState code: https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/util/PSQLState.java
PSQLState documentation: https://jdbc.postgresql.org/development/privateapi/org/postgresql/util/PSQLState.html
The 40001 serialization_failure error is listed here: https://www.postgresql.org/docs/11/errcodes-appendix.html
It seems like this should be added to the pgjdbc Java enum. Is there a reason it's not in there?
From | Date | Subject | |
---|---|---|---|
Next Message | Lucas Possamai | 2019-01-31 06:34:30 | Upgrading 9.2 to 9.6 questions |
Previous Message | Adrian Klaver | 2019-01-30 19:16:14 | Re: ALTER DEFAULT PRIVILEGES FOR ROLE |