alterSCHEMA: Generate a PostgreSQL ALTER SCHEMA statement, optionally...

View source: R/pgTools.R

alterSCHEMAR Documentation

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

Description

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

Usage

alterSCHEMA(name, rename_to = NULL, owner_to = NULL, con = NULL)

Arguments

name

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

rename_to

A string, the "new_name" parameter for PostgreSQL ALTER SCHEMA.

owner_to

A string, the "new_owner" parameter for PostgreSQL ALTER SCHEMA.

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

alterSCHEMA("dev", rename_to = "prod")

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

Related to alterSCHEMA in pgTools...