Postgres Jdbc Driver -

A type 4 JDBC driver that allows Java applications to connect to a PostgreSQL database using standard JDBC APIs. It translates JDBC calls into PostgreSQL's wire protocol (libpq).

conn.setAutoCommit(false); try // multiple operations conn.commit(); catch (SQLException e) conn.rollback(); finally conn.setAutoCommit(true); postgres jdbc driver

<dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.7.3</version> <!-- Check for latest --> </dependency> A type 4 JDBC driver that allows Java

jdbc:postgresql://localhost/mydb?ssl=true&sslmode=require¤tSchema=public&connectTimeout=10&ApplicationName=MyJavaApp 4.1 Query Execution // Statement try (Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT id, name FROM users")) while (rs.next()) int id = rs.getInt("id"); String name = rs.getString("name"); try // multiple operations conn.commit()

| PostgreSQL | JDBC Driver Version | |------------|---------------------| | 16.x | 42.7.x | | 15.x | 42.6.x - 42.7.x | | 14.x | 42.4.x - 42.7.x | | 13.x | 42.2.x - 42.7.x | | 12.x | 42.2.x - 42.7.x | | 11.x | 42.2.x - 42.7.x | | 10.x | 42.2.x - 42.7.x | | 9.6 | 42.2.x - 42.3.x |