Description
User-Friendly PostgreSQL Connection Management.
Description
Provides a user-friendly interface for managing PostgreSQL database connection settings. The package supplies helper functions to create, edit and load connection and option configuration files stored in a user-specific directory using the 'odbc' and 'RPostgres' back ends. These helpers make it easy to construct a reproducible connection string from a configuration file, either by reading user-defined YAML files or by parsing an environment variable.
README.md
rpgconn 
The goal of rpgconn is to provide a simple interface for connecting to a PostgreSQL database.
Setting RPG_CONN_STRING
The environment variable RPG_CONN_STRING must be set and have the format shown below.
cs <- "user=postgres;password=some_password;host=some_host;port=5432;dbname=postgres"
Sys.setenv(RPG_CONN_STRING = cs)
Installation
install.packages("rpgconn")
# OR
remotes::install_github("r-data-science/rpgconn")
Example
library(rpgconn)
library(DBI)
#open connection
cn <- dbc("some_database")
# List tables
dbListTables(cn)
# Close connection
dbd(cn)