Proposed fix for issue: Error: host must be a single element of type 'character'.
Unfortunately I ran into the error: Error: host must be a single element of type 'character'. This occurred in my install on R version 4.0.3, and Postgresql 11.
I resolved this issue locally by changing the functions in R/sp_postgresql_functions.R to:
#' @importFrom DBI dbGetInfo .sp_pg_display_name <- function(connection) { db_info <- DBI::dbGetInfo(connection) return(paste(db_info[["dbname"]], db_info[["username"]], db_info[["host"]], sep = '_')) }
#' @importFrom DBI dbGetInfo .sp_pg_host_name <- function(connection) { db_info <- DBI::dbGetInfo(connection) return(paste(db_info[["dbname"]], db_info[["username"]], db_info[["host"]], sep = '_')) }
Thanks!! It'll take me a day or so to get all of this back up and running - I haven't touched it since the end of February 2020.