From: Craig Ringer <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] ce8333: Expose parameter status messages (GUC_REPORT) to t...
Date: Fri, 05 Jul 2019 05:45:26 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/3db55d-ce8333@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: ce8333a56ba74022adeb545b68e7d2bee32d966f
https://github.com/pgjdbc/pgjdbc/commit/ce8333a56ba74022adeb545b68e7d2bee32d966f
Author: Craig Ringer <craig@2ndquadrant.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] ce8333: Expose parameter status messages (GUC_REPORT) to t...
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/3db55d-ce8333@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/3db55d-ce8333@github.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox