You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expectation:
DBI::dbIsValid(connection) should return false if the connection is closed.
Actual behavior: DBI::dbIsValid(connection) returns true when the connection is closed in this postgres example.
con <- DBI::dbConnect(DatabaseConnector::DatabaseConnectorDriver(),
dbms = "postgresql",
server = Sys.getenv("CDM5_POSTGRESQL_SERVER"),
user = Sys.getenv("CDM5_POSTGRESQL_USER"),
password = Sys.getenv("CDM5_POSTGRESQL_PASSWORD"))
DBI::dbIsValid(con)
#> TRUE
DBI::dbDisconnect(con)
# this returns true
DBI::dbIsValid(con)
#> TRUE
# even though the connection is closed
DBI::dbListTables(con)
#> Error in rJava::.jcall(conn@jConnection, "Ljava/sql/DatabaseMetaData;", :
org.postgresql.util.PSQLException: This connection has been closed.
I can run this code interactively but when I run it using the reprex package it crashes R on my machine which is why I'm not able to provide an actual reprex.
Expectation:
DBI::dbIsValid(connection) should return false if the connection is closed.
Actual behavior: DBI::dbIsValid(connection) returns true when the connection is closed in this postgres example.
I can run this code interactively but when I run it using the reprex package it crashes R on my machine which is why I'm not able to provide an actual reprex.
The text was updated successfully, but these errors were encountered: