sp_pg_catalog: Fetch a PostgreSQL database catalog

Description Usage Arguments Value Examples

View source: R/sp_postgresql_functions.R

Description

PostgreSQL stores much of its metadata in system catalogs that are accessible to a connected user. This function takes a connection and returns the database catalog as a data frame.

Usage

1

Arguments

connection

A valid open DBI connection to a PostgreSQL database.

Value

A data frame with the contents of the database catalog. The columns are schemas, name, and type, where type is "matview" (materialized view), "view" or "table".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(sqlpetr)
library(dplyr)
connection <- sp_get_postgres_connection(
  user = "postgres",
  password = "postgres",
  dbname = "dvdrental"
)
print(sp_pg_catalog(connection))

## End(Not run)

smithjd/sqlpetr documentation built on Feb. 29, 2020, 8:15 p.m.