liveBook · Manning

Postgres driver

As explained in Spring AI in Action

The PostgreSQL JDBC driver is a Java library that enables JDBC applications to connect to PostgreSQL databases.

The PostgreSQL JDBC driver is a Java library that enables JDBC applications to connect to PostgreSQL databases. In a Spring Boot application, it supplies database connectivity for repositories and JDBC-backed persistence. section 7.3.1 section 5.4.1

Use the driver when configuring PostgreSQL-backed application features:

  • Add the driver as a runtime dependency alongside Spring Data JDBC when a custom server queries PostgreSQL. section 7.3.1
  • Supply a DataSource to JDBC components such as JdbcChatMemoryRepository. section 5.4.1
  • Select PostgreSQL-specific SQL behavior through PostgresChatMemoryRepositoryDialect when configuring JDBC chat memory. section 5.4.1

Gradle dependency

runtimeOnly 'org.postgresql:postgresql'

How Spring AI in Action covers it

How deep it goes
Shows dependency declaration and repository configuration, but does not explain the driver's internal protocol implementation.
Examples
Uses a Gradle runtime dependency and a PostgreSQL-backed JdbcChatMemoryRepository configuration.
What it assumes
Assumes familiarity with Java, Spring Boot dependencies, JDBC, and relational database configuration.
What you can do after
Operate PostgreSQL-backed JDBC features by adding the driver and wiring a DataSource into the relevant repository.
How it connects
Connects JDBC, Spring Data JDBC, DataSource, PostgreSQL, and Spring AI chat memory repositories.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.