RPostgreSQL Cannot Close Connections
问题 I have a shiny app that connects to a database using RPostgreSQL . At the end of the app the connection is closed and the driver should be unloaded but I get an error, warning me that the connection is not closed. The code looks something like this: # in the app.R file, but not in the server function: drv <- dbDriver("PostgreSQL") con <- dbConnect(drv, dbname = "database1", host = "localhost", port = 5432, user = "user", password = "pw") # in the server function: foo <- dbGetQuery(con,