I'm connecting and querying a PostgreSQL database through the dplyr
package in R. I know I can list all the tables in the database using dbListTables(con)
.
But, my tables are organized into different schema. What is the easiest way I can view all of the schema that are present in my database using R?
dbGetQuery(con, "SELECT nspname FROM pg_catalog.pg_namespace")