Top Deprecated By Reference
PostgreSQL JDBC Driver 42.7.2

Deprecated API


No API in this release is deprecated for removal.

Deprecated Item Summary

SinceDeprecated Item and Description

Returns:

JDBC driver version
org.postgresql.Driver.getVersion
()

use getMajorVersion() and getMinorVersion() instead

org.postgresql.PGConnection.addDataType(String
JDBC type name
type
,
String
class name
className
)

As of 8.0, replaced by addDataType(String, Class). This deprecated method does not work correctly for registering classes that cannot be directly loaded by the JDBC driver's classloader.

Returns:

Fastpath API for the current connection
org.postgresql.PGConnection.getFastpathAPI
()

This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call.

org.postgresql.PGProperty.LOGGER_FILE

Logging is configured via java.util.logging.

org.postgresql.PGProperty.LOGGER_LEVEL

Logging is configured via java.util.logging.

org.postgresql.PGProperty.SSL_FACTORY_ARG

use ..Factory(Properties) constructor.

Returns:

evaluated value for this connection parameter or null
org.postgresql.PGProperty.get
(Properties
properties to take actual value from
properties
)

use getOrDefault(Properties) instead

org.postgresql.PGRefCursorResultSet

As of 8.0, this interface is only present for backwards- compatibility purposes. New code should call getString() on the ResultSet that contains the refcursor to obtain the underlying cursor name.

Returns:

the name of the cursor.
org.postgresql.PGRefCursorResultSet.getRefCursor
()

As of 8.0, replaced with calling getString() on the ResultSet that this ResultSet was obtained from.

org.postgresql.PGStatement.setUseServerPrepare(boolean
use server prepare
flag
)

As of build 302, replaced by setPrepareThreshold(int)

org.postgresql.core.PGStream(SocketFactory
socket factory
socketFactory
,
HostSpec
the host and port to connect to
hostSpec
)

use PGStream(SocketFactory, org.postgresql.util.HostSpec, int)

org.postgresql.core.QueryExecutor.QUERY_DISALLOW_BATCHING

in PgJDBC 9.4 as we now auto-size batches.

Returns:

a ParameterList suitable for passing to fastpathCall.
org.postgresql.core.QueryExecutor.createFastpathParameters
(int
the number of parameters the fastpath call will take
count
)

This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call.

Returns:

the binary-format result of the fastpath call, or null if a void result was returned
org.postgresql.core.QueryExecutor.fastpathCall
(int
the OID of the backend function to invoke
fnid
,
ParameterList
a ParameterList returned from createFastpathParameters containing the parameters to pass to the backend function
params
,
boolean
if begin should be suppressed
suppressBegin
)

This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call.

Returns:

The oids to request with binary encoding.
org.postgresql.core.QueryExecutor.getBinaryReceiveOids
()

the method returns a copy of the set, so it is not efficient. Use useBinaryForReceive(int)

Returns:

useBinaryForOids The oids to send with binary encoding.
org.postgresql.core.QueryExecutor.getBinarySendOids
()

the method returns a copy of the set, so it is not efficient. Use useBinaryForSend(int)

Returns:

server version in number form
org.postgresql.core.Utils.parseServerVersionStr
(@Nullable String
server version in a XXYYZZ form
serverVersion
)

use specific Version instance

org.postgresql.ds.PGPoolingDataSource

Since 42.0.0, instead of this class you should use a fully featured connection pool like HikariCP, vibur-dbcp, commons-dbcp, c3p0, etc.

Returns:

loggerFile in properties
org.postgresql.ds.common.BaseDataSource.getLoggerFile
()

Configure via java.util.logging

Returns:

loggerLevel in properties
org.postgresql.ds.common.BaseDataSource.getLoggerLevel
()

Configure via java.util.logging

Returns:

The port, or 0 if the default port will be used.
org.postgresql.ds.common.BaseDataSource.getPortNumber
()

use getPortNumbers()

Returns:

name of the host the PostgreSQL database is running on
org.postgresql.ds.common.BaseDataSource.getServerName
()

use getServerNames()

org.postgresql.ds.common.BaseDataSource.setLoggerFile(@Nullable String
will be ignored
loggerFile
)

Configure via java.util.logging

org.postgresql.ds.common.BaseDataSource.setLoggerLevel(@Nullable String
loggerLevel to set, will be ignored
loggerLevel
)

Configure via java.util.logging

org.postgresql.ds.common.BaseDataSource.setPortNumber(int
port which the PostgreSQL server is listening on for TCP/IP
portNumber
)

use setPortNumbers(int[])

org.postgresql.ds.common.BaseDataSource.setServerName(String
name of the host the PostgreSQL database is running on
serverName
)

use setServerNames(String[])

org.postgresql.fastpath.Fastpath

This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call.

Returns:

null if no data, Integer if an integer result, Long if a long result, or byte[] otherwise
org.postgresql.fastpath.Fastpath.fastpath
(int
Function id
fnId
,
boolean
True if the result is a numeric (Integer or Long)
resultType
,
FastpathArg[]
FastpathArguments to pass to fastpath
args
)

please use fastpath(int, FastpathArg[])

Returns:

null if no data, Integer if an integer result, Long if a long result, or byte[] otherwise
org.postgresql.fastpath.Fastpath.fastpath
(String
Function name
name
,
boolean
True if the result is a numeric (Integer or Long)
resulttype
,
FastpathArg[]
FastpathArguments to pass to fastpath
args
)

Use getData(String, FastpathArg[]) if you expect a binary result, or one of getInteger(String, FastpathArg[]) or getLong(String, FastpathArg[]) if you expect a numeric one

org.postgresql.fastpath.FastpathArg

This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call.

org.postgresql.geometric.PGpoint.setLocation(Point
Point to move to
p
)

Will be removed for avoiding a dependency to the java.desktop module.

org.postgresql.hostchooser.HostRequirement.master

we no longer use the terms master or slave in the driver, or the PostgreSQL project.

Returns:

the matching offset date time
org.postgresql.jdbc.TimestampUtils.toOffsetDateTime
(Time
the time value
t
)

was used internally, and not used anymore

Returns:

the OID of this LargeObject
org.postgresql.largeobject.LargeObject.getOID
()

As of 8.3, replaced by getLongOID()

Returns:

oid of new object
org.postgresql.largeobject.LargeObjectManager.create
()

As of 8.3, replaced by createLO()

Returns:

oid of new object
org.postgresql.largeobject.LargeObjectManager.create
(int
a bitmask describing different attributes of the new object
mode
)

As of 8.3, replaced by createLO(int)

org.postgresql.largeobject.LargeObjectManager.delete(int
describing object to delete
oid
)

As of 8.3, replaced by delete(long)

Returns:

LargeObject instance providing access to the object
org.postgresql.largeobject.LargeObjectManager.open
(int
of large object
oid
)

As of 8.3, replaced by open(long)

Returns:

LargeObject instance providing access to the object
org.postgresql.largeobject.LargeObjectManager.open
(int
of large object
oid
,
int
mode of open
mode
)

As of 8.3, replaced by open(long, int)

org.postgresql.ssl.jdbc4.LibPQFactory(Properties
the connection parameters The following parameters are used: sslmode,sslcert,sslkey,sslrootcert,sslhostnameverifier,sslpasswordcallback,sslpassword
info
)

prefer org.postgresql.ssl.LibPQFactory

Returns:

true if the certificate belongs to the server, false otherwise.
org.postgresql.ssl.jdbc4.LibPQFactory.verify
(String
Hostname or IP address of the server.
hostname
,
SSLSession
The SSL session.
session
)

use PgjdbcHostnameVerifier

Returns:

true when domain matches pattern
org.postgresql.ssl.jdbc4.LibPQFactory.verifyHostName
(String
input hostname
hostname
,
String
domain name pattern
pattern
)

use PGjdbcHostnameVerifier

Returns:

The text representation of the password encrypted for md5 authentication.
org.postgresql.util.PasswordUtil.encodeMd5
(String
The username of the database user
user
,
char[]
The plain text of the user's password. The implementation will zero out the array after use
password
)

prefer org.postgresql.PGConnection#alterUserPassword(String, char[], String) or encodeScramSha256(char[]) for better security.

Deprecated Reference Summary

SinceItem with Deprecated Reference and Description
org.postgresql.ds.PGPoolingDataSource.getDataSource(String name)

PGPoolingDataSource is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

FastpathArg with an oid parameter
org.postgresql.fastpath.Fastpath.createOIDArg
(long
input oid
oid
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

null if no data, byte[] otherwise
org.postgresql.fastpath.Fastpath.fastpath
(int
Function id
fnId
,
FastpathArg[]
FastpathArguments to pass to fastpath
args
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

null if no data, byte[] otherwise
org.postgresql.fastpath.Fastpath.fastpath
(String
Function name
name
,
FastpathArg[]
FastpathArguments to pass to fastpath
args
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

byte[] array containing result
org.postgresql.fastpath.Fastpath.getData
(String
Function name
name
,
FastpathArg[]
Function arguments
args
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

integer result
org.postgresql.fastpath.Fastpath.getInteger
(String
Function name
name
,
FastpathArg[]
Function arguments
args
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

long result
org.postgresql.fastpath.Fastpath.getLong
(String
Function name
name
,
FastpathArg[]
Function arguments
args
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

oid of the given call
org.postgresql.fastpath.Fastpath.getOID
(String
Function name
name
,
FastpathArg[]
Function arguments
args
)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.fastpath.FastpathArg.of(ByteStreamWriter writer)

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.fastpath.FastpathArg.ByteStreamWriterFastpathArg

FastpathArg is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.jdbc.PgConnection.fastpath

Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.jdbc.PgConnection.getFastpathAPI()

Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.jdbc.BatchResultHandler.generatedKeys

PgResultSet is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.jdbc.BatchResultHandler.latestGeneratedKeysRs

PgResultSet is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.jdbc.PgResultSet

PGRefCursorResultSet is deprecated or references (maybe indirectly) at least one deprecated element.

Returns:

PgResultSet
org.postgresql.jdbc.PgResultSet.upperCaseFieldLabels
()

PgResultSet is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.largeobject.LargeObject.fp

Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.largeobject.LargeObject(Fastpath
FastPath API for the connection to use
fp
,
long
of the Large Object to open
oid
,
int
Mode of opening the large object
mode
,
@Nullable BaseConnection
the connection to the database used to access this LOB
conn
,
boolean
commit the transaction when this LOB will be closed (defined in LargeObjectManager)
commitOnClose
)

Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.largeobject.LargeObject(Fastpath
FastPath API for the connection to use
fp
,
long
of the Large Object to open
oid
,
int
Mode of opening the large object (defined in LargeObjectManager)
mode
)

Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.

org.postgresql.largeobject.LargeObjectManager.fp

Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.