sqlpetr icon indicating copy to clipboard operation
sqlpetr copied to clipboard

Proposed fix for issue: Error: host must be a single element of type 'character'.

Open reinout91 opened this issue 4 years ago • 1 comments

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 = '_')) }

reinout91 avatar Jun 23 '21 20:06 reinout91

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.

znmeb avatar Jun 24 '21 01:06 znmeb