alterDATABASE {pgTools}R Documentation

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

Description

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

Usage

alterDATABASE(
  name,
  allow_connections = NULL,
  connection_limit = NULL,
  is_template = NULL,
  rename_to = NULL,
  owner_to = NULL,
  set_tablespace = NULL,
  con = NULL
)

Arguments

name

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

allow_connections

A string, the "allowconn" parameter for PostgreSQL ALTER DATABASE.

connection_limit

A string, the "connlimit" parameter for PostgreSQL ALTER DATABASE.

is_template

A string, the "istemplate" parameter for PostgreSQL ALTER DATABASE.

rename_to

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

owner_to

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

set_tablespace

A string, the "new_tablespace" parameter for PostgreSQL ALTER DATABASE.

con

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

Value

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

Examples

alterDATABASE("dbTest01", rename_to = "dbProd01")

[Package pgTools version 1.0.2 Index]