Skip to content
Browse files
fix: reintroduce Driver.getVersion for backward compatibility reasons (

The method was removed in #668, however
certain applications might still depend on it.


Mark the method as deprecated.
  • Loading branch information
vlsi committed Aug 4, 2017
1 parent 5f083d1 commit 50d5dd3e708a92602e04d6b4aa0822ad3f110a78
Showing with 12 additions and 0 deletions.
  1. +12 −0 pgjdbc/src/main/java/org/postgresql/
@@ -7,6 +7,7 @@

import org.postgresql.jdbc.PgConnection;

import org.postgresql.util.DriverInfo;
import org.postgresql.util.ExpressionProperties;
import org.postgresql.util.GT;
import org.postgresql.util.HostSpec;
@@ -503,6 +504,17 @@ public int getMinorVersion() {
return org.postgresql.util.DriverInfo.MINOR_VERSION;

* Returns the server version series of this driver and the specific build number.
* @return JDBC driver version
* @deprecated use {@link #getMajorVersion()} and {@link #getMinorVersion()} instead
public static String getVersion() {
return DriverInfo.DRIVER_FULL_NAME;

* Report whether the driver is a genuine JDBC compliant driver. A driver may only report "true"
* here if it passes the JDBC compliance tests, otherwise it is required to return false. JDBC

0 comments on commit 50d5dd3

Please sign in to comment.