Skip to content

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

@reinout91

Description

@reinout91

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions