Is it correct that the following two are different concepts:
Is it correct that the JavaSE's java.sql package is an API built upon a JDBC driver, to become driver-agnostic?
In C for PostgreSQL,
Java SE' java.sql
package defines interfaces that Java libraries called JDBC drivers can implement to provide the functionality of working with a database in a way that's [almost] vendor agnostic. With JDBC (the java.sql
package), you [almost] never use vendor-specific classes, and just program against the interfaces.
libpq is something completely different - it's a c library that's completely specific to postgres. It makes no claim and no attempt to be a generic interface to program against any RDBMS.