createSCHEMA {pgTools}R Documentation

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

Description

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

Usage

createSCHEMA(name, authorization = NULL, if_not_exists = FALSE, con = NULL)

Arguments

name

A string, the "schema_name" parameter for PostgreSQL CREATE SCHEMA.

authorization

A string, the "role_specification" parameter for PostgreSQL CREATE SCHEMA.

if_not_exists

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

con

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

Value

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

Examples

createSCHEMA("dev")

[Package pgTools version 1.0.2 Index]