User-Friendly PostgreSQL Connection Management

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.


rpgconn

Codecov R-CMD-check test-coverage CRAN status

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)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rpgconn")

0.3.2 by Bobby Fatemi, a year ago


https://github.com/r-data-science/rpgconn


Report a bug at https://github.com/r-data-science/rpgconn/issues


Browse source code at https://github.com/cran/rpgconn


Authors: Bobby Fatemi [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports DBI, fs, RPostgres, stringr, usethis, yaml

Suggests rstudioapi, spelling, testthat


See at CRAN