Summary

The JDBC package is a large piece of technology. This chapter described the basic techniques for connecting a Java application to PostgreSQL using JDBC and the PostgreSQL JDBC driver. It does not cover a few of the more advanced JDBC topics.

The Connection class includes methods that can commit and roll back transactions—of course, you can do that yourself by executing COMMIT and ROLLBACK commands.

The examples in this chapter intercept database errors by catching exceptions. JDBC also throws exceptions for database warnings.

One of the more interesting features added to the JDBC 2.0 specification is the updateable ResultSet. This feature lets you update, insert, and delete rows in a result set by directly modifying the ResultSet, rather ...

Get PostgreSQL, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.