dropPROCEDURE {pgTools}R Documentation

Generate a PostgreSQL DROP PROCEDURE statement, optionally execute the statement if con is not NULL.

Description

Generate a PostgreSQL DROP PROCEDURE statement, optionally execute the statement if con is not NULL.

Usage

dropPROCEDURE(
  name,
  args = NULL,
  if_exists = FALSE,
  cascade = FALSE,
  restrict = FALSE,
  con = NULL
)

Arguments

name

A string, the "name" parameter for PostgreSQL DROP PROCEDURE.

args

A named list, names are the argument names, values are strings with the argument data types.

if_exists

TRUE/FALSE, if TRUE, adds "IF EXISTS" to PostgreSQL DROP PROCEDURE statement.

cascade

TRUE/FALSE, if TRUE, adds "CASCADE" to PostgreSQL DROP PROCEDURE statement.

restrict

TRUE/FALSE, if TRUE, adds "RESTRICT" to PostgreSQL DROP PROCEDURE statement.

con

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

Value

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

Examples

dropPROCEDURE(
name = "sample",
args = list(a = "INTEGER", b = "TEXT")
)

[Package pgTools version 1.0.2 Index]