Spanner supports these JDBC drivers:
- The Spanner JDBC driver, which is an open-source JDBC driver that is written, provided, and supported by Google, similar to the Cloud Client Libraries. This is the recommended JDBC driver for Spanner, especially for the GoogleSQL dialect. You can also use it to connect to PostgreSQL-dialect databases.
- The PostgreSQL JDBC driver in combination with PGAdapter. This driver only supports PostgreSQL-dialect databases.
Spanner JDBC driver | PostgreSQL JDBC driver | |
---|---|---|
Download | Maven Central | Maven Central |
Written by | PostgreSQL | |
Support | ||
Open source | Yes; Apache license | Yes; BSD 2-Clause |
For information about the Spanner JDBC driver, see Spanner JDBC driver FAQ and How to use the Spanner JDBC driver.
For information about the PostgreSQL JDBC driver, see Connect JDBC to a PostgreSQL-dialect database.