dropDATABASE: Generate a PostgreSQL DROP DATABASE statement, optionally...

View source: R/pgTools.R

dropDATABASER Documentation

Generate a PostgreSQL DROP DATABASE statement, optionally execute the statement if con is not NULL.

Description

Generate a PostgreSQL DROP DATABASE statement, optionally execute the statement if con is not NULL.

Usage

dropDATABASE(name, if_exists = FALSE, force = FALSE, con = NULL)

Arguments

name

A string, the "name" parameter for PostgreSQL DROP DATABASE.

if_exists

TRUE/FALSE, if TRUE, adds "IF EXISTS" to PostgreSQL DROP DATABASE statement.

force

TRUE/FALSE, if TRUE, adds "FORCE" to PostgreSQL DROP DATABASE statement.

con

A database connection that can be passed to DBI::dbSendQuery/DBI::dbGetQuery.

Value

A string, PostgreSQL DROP DATABASE statement; or the results retrieved by DBI::dbSendQuery after executing the statement.

Examples

dropDATABASE("dbTest01")

pgTools documentation built on March 31, 2023, 7:56 p.m.