From: | Craig Ringer <noreply(at)github(dot)com> |
---|---|
To: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
Subject: | [pgjdbc/pgjdbc] ce8333: Expose parameter status messages (GUC_REPORT) to t... |
Date: | 2019-07-05 12:45:26 |
Message-ID: | pgjdbc/pgjdbc/push/refs/heads/master/3db55d-ce8333@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: ce8333a56ba74022adeb545b68e7d2bee32d966f
https://github.com/pgjdbc/pgjdbc/commit/ce8333a56ba74022adeb545b68e7d2bee32d966f
Author: Craig Ringer <craig(at)2ndquadrant(dot)com>
Date: 2019-07-05 (Fri, 05 Jul 2019)
Changed paths:
M docs/documentation/head/ext.md
A docs/documentation/head/parameterstatus.md
M docs/documentation/head/replication.md
M docs/documentation/head/server-prepare.md
M pgjdbc/src/main/java/org/postgresql/PGConnection.java
M pgjdbc/src/main/java/org/postgresql/core/QueryExecutor.java
M pgjdbc/src/main/java/org/postgresql/core/QueryExecutorBase.java
M pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc2/ParameterStatusTest.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/StatementTest.java
Log Message:
-----------
Expose parameter status messages (GUC_REPORT) to the user (#1435)
* Expose parameter status messages (GUC_REPORT) to the user
Add a new `Map PGConnection.getParameterStatuses()` method that tracks the
latest values of all `GUC_REPORT` parameters reported by the server in
`ParameterStatus` protocol messages from the server. The map is read-only. A
convenience `PGConnection.getParameterStatus(String)` wrapper is also provided.
This provides a PgJDBC equivalent to the `PQparameterStatus(...)` `libpq` API
function.
Extensions may define custom GUCs that are set as `GUC_REPORT` when they
`DefineCustomStringVariable(...)` etc. This feature will properly handle such
GUCs, allowing applications to generate parameter status change messages in
their extensions and have them available to the JDBC driver without needing
round trips.
No assumptions are made about which server GUCs are `GUC_REPORT` or their
names, so it'll work (with possible test case tweaks) on current and future
server versions.
Github issue pgjdbc/pgjdbc#1428
* Attempt to make StatementTest.testShortQueryTimeout() more reliable
I'm observing intermittent failures like:
testShortQueryTimeout(org.postgresql.test.jdbc2.StatementTest) Time elapsed: 0.219 sec <<< ERROR!
org.postgresql.util.PSQLException: ERROR: canceling statement due to user request
The cause of that isn't yet clear. But I noticed that the test doesn't check
for the SQLSTATE of the expected exception, so fix that.
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Hernández | 2019-07-08 18:30:13 | SCRAM v2: adding support for Java7 and SaslPrep |
Previous Message | Pavel Raiskup | 2019-07-03 07:07:28 | [pgjdbc/pgjdbc] 3db55d: fix parent version in pgjdbc/pom.xml as well |