dbAttachPartEM: Add or Remove a Partition

Description Usage Arguments Value

Description

From a partitioned table or partitioned index add or remove a partition.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dbAttachPartEM(
  connName,
  dbobject = "table",
  name,
  partition,
  if.not.exists = FALSE,
  part.bound.value,
  action = c("attach", "drop"),
  env,
  display = TRUE,
  exec = TRUE
)

Arguments

connName

String. Default is "connEM". Contains the name of the variable that contains the name of the "connection" in the environment "env".

dbobject

A character string specifying if the the type of the parent database object. This can be "table"(default) or "index".

name

A character string specifying a PostgreSQL already partitioned table or index name. Note, a table can not be converted to a partitioned table and vice-versa. ALTER has no option.

partition

A character string specifying the name of the partition.

if.not.exists

Logical. Default is FALSE. If TRUE, use pg_ tables to check that in the (potential target partition) object exists and is not attached, before the partitioned table or partitioned index tries to attach to it.

part.bound.value

Of the attaching the partition, the partitions partition bound single value.

action

A character string specifying if the column is to be added ("attach", default) or removed ("drop").

env

Environment. Default is the .Global environment. This is the environment to return the connection object "connEM".

display

Logical. Whether to display the query (defaults to TRUE).

exec

Logical. Whether to execute the query (defaults to TRUE).

Value

TRUE if the partition was successfully added or removed.


AndreMikulec/econModel documentation built on June 30, 2021, 9:48 a.m.