兼容性 JDBC 驱动程序版本和 PostgreSQL 版本

Compability JDBC driver versions and PostgreSQL versions

谁能告诉我在哪里可以找到哪个 postgreSQL 数据库版本需要哪个 JDBC 驱动程序版本的确切文档?

在手头的案例中,我想知道:连接到 PostgreSQL 11.13 版本数据库的 Java 服务器应用程序所需的最低 JDBC 版本是多少?

不幸的是,PostgreSQL JDBC 驱动程序网站对此并不十分准确:

The current version of the driver should be compatible with PostgreSQL 8.2 and higher, and Java 6 (JDBC 4.0), Java 7 (JDBC 4.1), Java 8 (JDBC 4.2) and Java 9.

https://jdbc.postgresql.org/about/about.html

题错了。您为什么要使用错误尽可能多的 JDBC 驱动程序?

而是你想问最新的JDBC驱动支持的最旧版本是什么,the documentation会告诉你

[...] nning old applications or JVMs), this is the driver you should be using. It supports PostgreSQL 8.2 or newer and requires Java 6 or newer.

始终使用最新的 JDBC 驱动程序,不会出错。