On Sun, 2026-10-04 at 23:09 -0700, Igor Korot wrote:
> What do issue in the libpq interface to
> select the current database?
You cannot select the current database. A database connection remains
connected to the same database for the entire time of the connection.
You'll have to do what psql does: connect to the second database, and
if that succeeds, disconnect from the first one.
Yours,
Laurenz Albe