Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Eric Neron <eneron(at)e-djuster(dot)ca>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>, Dave Cramer <pg(at)fastcrypt(dot)com>
Subject: Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...
Date: 2016-05-18 06:07:04
Message-ID: CAB=Je-GePXXqyhuQSzf_Nx7+AVtZQRcGFWe3siOKEkjyKFjyXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Note:
org.postgresql.jdbc.PgConnection, org.postgresql.core.BaseConnection,
and org.postgresql.copy.CopyManager(BaseConnection connection) are NOT part
of pgjdbc public API.
Those connection classes and CopyManager constructor should NOT be used in
application code.

The proper interface is org.postgresql.PGConnection.
The proper way to get CopyManager is to call
org.postgresql.PGConnection#getCopyAPI.

When using a connection pool, PGConnection pgConnection = connection.unwrap
( PGConnection.class ); should work.

Vladimir

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-05-18 13:28:50 Re: Cast java.sql.Connection to PGConnection
Previous Message Dave Cramer 2016-05-17 22:20:56 Re: Tomcat JDBC Connection Pool interfaces to PostgreSQL...