PostgreSQL features
PostgreSQL-specific functionality exposed through pgJDBC extensions to
the standard JDBC API: LISTEN/NOTIFY, COPY, physical and logical
replication, parameter-status messages, and the PGConnection
extension surface.
Reached from Connection.unwrap(PGConnection.class). The standard
JDBC interfaces have no equivalent; these are intentional pgjdbc
extensions, not portable to other drivers.
- Driver extensions API
Reaching PostgreSQL-only functionality from JDBC through
Connection.unwrap(PGConnection.class): the entry point for COPY, LISTEN / NOTIFY, large objects, fastpath, replication, and parameter-status APIs. - Listen / Notify
Receiving PostgreSQL
LISTEN/NOTIFYevents throughPGConnection.getNotifications(), the blocking and non-blocking variants, and the no-background-thread caveat: the application is responsible for draining the socket. - Parameter status
Reading
GUC_REPORTserver parameters that PostgreSQL pushes via Parameter Status protocol messages, through thePGConnection.getParameterStatus*extension methods added in pgJDBC 42.2.7. - COPY (CopyManager)
Bulk-loading and bulk-extracting rows over the PostgreSQL
COPYprotocol throughCopyManager(PGConnection.getCopyAPI()), in text or binary mode, with theCopyIn/CopyOutstreaming interfaces. - Physical replication and logical decoding
JDBC access to PostgreSQL physical replication and logical decoding: opening a replication-mode connection (
replication=database/true), thePGReplicationConnectionAPI, and consuming WAL records or row-level change events.