createDATABASE {pgTools}R Documentation

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

Description

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

Usage

createDATABASE(
  name,
  owner = NULL,
  template = NULL,
  encoding = NULL,
  locale = NULL,
  lc_collate = NULL,
  lc_ctype = NULL,
  tablespace = NULL,
  allow_connections = NULL,
  connection_limit = NULL,
  is_template = NULL,
  con = NULL
)

Arguments

name

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

owner

A string, the "user_name" parameter for PostgreSQL CREATE DATABASE.

template

A string, the "template" parameter for PostgreSQL CREATE DATABASE.

encoding

A string, the "encoding" parameter for PostgreSQL CREATE DATABASE.

locale

A string, the "locale" parameter for PostgreSQL CREATE DATABASE

lc_collate

A string, the "lc_collate" parameter for PostgreSQL CREATE DATABASE.

lc_ctype

A string, the "lc_ctype" parameter for PostgreSQL CREATE DATABASE.

tablespace

A string, the "tablespace_name" parameter for PostgreSQL CREATE DATABASE.

allow_connections

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

connection_limit

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

is_template

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

con

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

Value

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

Examples

createDATABASE("dbTest01")

[Package pgTools version 1.0.2 Index]