pg_addColumn {pgTools} | R Documentation |
Helper command to add a column via ALTER TABLE.
Description
Helper command to add a column via ALTER TABLE.
Usage
pg_addColumn(
column_name,
data_type,
default = NULL,
constraint = NULL,
if_not_exists = FALSE
)
Arguments
column_name |
A string, the name of the column to add. |
data_type |
A string, the data type of the column to add. |
default |
A string, a default value for the column to add. |
constraint |
A string, a constraint for the column to add. |
if_not_exists |
Boolean, if TRUE, adds IF NOT EXISTS to the ADD COLUMN statement. |
Value
A string, PostgreSQL helper statement to add a column using ALTER TABLE.
Examples
pg_addColumn(
column_name = "newCol",
data_type = "text"
)
[Package pgTools version 1.0.2 Index]