Skip to contents

create_db

Usage

create_db(conn, db_name, app_role)

Arguments

conn

A DBI database connection connecting to the postgres database with the admin login

db_name

The name of the database to be created

app_role

The name of the user to be created with the database

Value

The details of the database and user created

Examples

conn <- pool::dbPool(drv = RPostgres::Postgres(), host = "xxxxxxx", port = 5432, dbname = "postgres", user = "xxxxx", password = "xxxxxxx", sslmode = "prefer")
#> Error in loadNamespace(x): there is no package called ‘pool’
create_db(conn, "test_db", "test_user")
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'conn' in selecting a method for function 'dbExecute': object 'conn' not found