It looks like the issue was that pool::dbListFields() wasn't handling the multiple schemas well. I just replaced it with a call of pool::dbGetQuery() instead that returns the result of the following SQL statement:
query <- dbplyr::sql(stringr::str_c("SELECT column_name FROM information_schema.columns WHERE table_schema = '",
schema,
"' AND table_name = '",
table, "'"))
Written more simply, that's just:
SELECT column_name FROM information_schema.columns WHERE table_schema = [schema the user wants to know about] AND table_name = [table the user wants to know about]
It looks like the issue was that
pool::dbListFields()
wasn't handling the multiple schemas well. I just replaced it with a call ofpool::dbGetQuery()
instead that returns the result of the following SQL statement:Written more simply, that's just:
SELECT column_name FROM information_schema.columns WHERE table_schema = [schema the user wants to know about] AND table_name = [table the user wants to know about]