# Deprecated API

## Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors
- Deprecated Enum Constants

Deprecated Interfaces
Interface and Description
com.amazon.redshift.RedshiftRefCursorResultSet 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.

Deprecated Classes
Class and Description
com.amazon.redshift.jdbc2.optional.ConnectionPool Please use `RedshiftConnectionPoolDataSource`
com.amazon.redshift.jdbc.EscapedFunctions see `EscapedFunctions2`
com.amazon.redshift.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.
com.amazon.redshift.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.
com.amazon.redshift.jdbc3.Jdbc3ConnectionPool Please use `RedshiftConnectionPoolDataSource`
com.amazon.redshift.jdbc3.Jdbc3PoolingDataSource Since 2.0.0, see `RedshiftPoolingDataSource`
com.amazon.redshift.jdbc3.Jdbc3SimpleDataSource Please use `RedshiftSimpleDataSource`
com.amazon.redshift.ssl.jdbc4.LibPQFactory prefer `LibPQFactory`
com.amazon.redshift.jdbc2.optional.PoolingDataSource Since 2.0.0, see `RedshiftPoolingDataSource`
com.amazon.redshift.ds.RedshiftPoolingDataSource Since 42.0.0, instead of this class you should use a fully featured connection pool like HikariCP, vibur-dbcp, commons-dbcp, c3p0, etc.
com.amazon.redshift.jdbc2.optional.SimpleDataSource Please use `RedshiftSimpleDataSource`

Deprecated Fields
Field and Description
com.amazon.redshift.core.QueryExecutor.QUERY_DISALLOW_BATCHING in PgJDBC 9.4 as we now auto-size batches.

Deprecated Methods
Method and Description
com.amazon.redshift.largeobject.LargeObjectManager.create() As of 8.3, replaced by `createLO()`
com.amazon.redshift.largeobject.LargeObjectManager.create(int) As of 8.3, replaced by `createLO(int)`
com.amazon.redshift.core.QueryExecutor.createFastpathParameters(int) 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.
com.amazon.redshift.largeobject.LargeObjectManager.delete(int) As of 8.3, replaced by `delete(long)`
com.amazon.redshift.fastpath.Fastpath.fastpath(int, boolean, FastpathArg[]) please use `Fastpath.fastpath(int, FastpathArg[])`
com.amazon.redshift.fastpath.Fastpath.fastpath(String, boolean, FastpathArg[]) Use `Fastpath.getData(String, FastpathArg[])` if you expect a binary result, or one of `Fastpath.getInteger(String, FastpathArg[])` or `Fastpath.getLong(String, FastpathArg[])` if you expect a numeric one
com.amazon.redshift.core.QueryExecutor.fastpathCall(int, ParameterList, boolean) 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.
com.amazon.redshift.RedshiftConnection.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.
com.amazon.redshift.largeobject.LargeObject.getOID() As of 8.3, replaced by `LargeObject.getLongOID()`
com.amazon.redshift.ds.common.BaseDataSource.getPortNumber() use `BaseDataSource.getPortNumbers()`
com.amazon.redshift.RedshiftRefCursorResultSet.getRefCursor() As of 8.0, replaced with calling getString() on the ResultSet that this ResultSet was obtained from.
com.amazon.redshift.ds.common.BaseDataSource.getServerName() use `BaseDataSource.getServerNames()`
com.amazon.redshift.Driver.getVersion() use `Driver.getMajorVersion()` and `Driver.getMinorVersion()` instead
com.amazon.redshift.largeobject.LargeObjectManager.open(int) As of 8.3, replaced by `open(long)`
com.amazon.redshift.largeobject.LargeObjectManager.open(int, int) As of 8.3, replaced by `open(long, int)`
com.amazon.redshift.core.Utils.parseServerVersionStr(String) use specific `Version` instance
com.amazon.redshift.ds.common.BaseDataSource.setPortNumber(int) use `BaseDataSource.setPortNumbers(int[])`
com.amazon.redshift.ds.common.BaseDataSource.setServerName(String) use `BaseDataSource.setServerNames(String[])`
com.amazon.redshift.RedshiftStatement.setUseServerPrepare(boolean) As of build 302, replaced by `RedshiftStatement.setPrepareThreshold(int)`
com.amazon.redshift.largeobject.LargeObjectManager.unlink(int) As of 8.3, replaced by `unlink(long)`
com.amazon.redshift.ssl.jdbc4.LibPQFactory.verify(String, SSLSession) use PgjdbcHostnameVerifier
com.amazon.redshift.ssl.jdbc4.LibPQFactory.verifyHostName(String, String) use `RedshiftjdbcHostnameVerifier`

Deprecated Constructors
Constructor and Description
com.amazon.redshift.ssl.jdbc4.LibPQFactory(Properties) prefer `LibPQFactory`
com.amazon.redshift.core.RedshiftStream(SocketFactory, HostSpec, RedshiftLogger, Properties) use `RedshiftStream(SocketFactory, com.amazon.redshift.util.HostSpec, int, RedshiftLogger, boolean, Properties)`

Deprecated Enum Constants
Enum Constant and Description
com.amazon.redshift.hostchooser.HostRequirement.master we no longer use the terms master or slave in the driver, or the Redshift project.
com.amazon.redshift.RedshiftProperty.SOCKET_FACTORY_ARG use `..Factory(Properties)` constructor.
com.amazon.redshift.RedshiftProperty.SSL_FACTORY_ARG use `..Factory(Properties)` constructor.