dropSCHEMA: Generate a PostgreSQL DROP SCHEMA statement, optionally...

View source: R/pgTools.R

dropSCHEMAR Documentation

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

Description

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

Usage

dropSCHEMA(
  name,
  if_exists = FALSE,
  cascade = FALSE,
  restrict = FALSE,
  con = NULL
)

Arguments

name

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

if_exists

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

cascade

TRUE/FALSE, if TRUE, adds "CASCADE" to PostgreSQL DROP SCHEMA statement.

restrict

TRUE/FALSE, if TRUE, adds "RESTRICT" to PostgreSQL DROP SCHEMA statement.

con

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

Value

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

Examples

dropSCHEMA("dev")

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

Related to dropSCHEMA in pgTools...