user7964977
user7964977

Reputation:

View a list of all schema in a PostgreSQL database in r?

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?

Upvotes: 4

Views: 2137

Answers (1)

user7964977
user7964977

Reputation:

dbGetQuery(con, "SELECT nspname FROM pg_catalog.pg_namespace")

Upvotes: 6

Related Questions