R/sql-funs.R

Defines functions psql_con

# PostgreSQL database connection
# If the credentials are not located in .Rprofile, this won't work.
# Don't edit to put credentials here!

psql_con <- function() {
  DBI::dbConnect(
    DBI::dbDriver("PostgreSQL"),
    host = dbhost,
    port = dbport,
    user = dbusr,
    password = dbpwd,
    dbname = dbname
  )
}
pachamaltese/pachamisc documentation built on Dec. 28, 2019, 7:05 p.m.