dbSchema: Check and create schema.

View source: R/all_db_wrapper_fns.R

dbSchemaR Documentation

Check and create schema.

Description

Checks the existence, and if necessary, creates a schema.

Usage

dbSchema(conn, name, display = TRUE, exec = TRUE)

Arguments

conn

A connection object (required, even if exec = FALSE).

name

A character string specifying a PostgreSQL schema name.

display

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

exec

Logical. Whether to execute the query (defaults to TRUE). Note: if exec = FALSE, the function still checks the existence of the schema, but does not create it if it does not exists.

Value

If exec = TRUE, returns TRUE if the schema exists (whether it was already available or was just created).

Author(s)

Mathieu Basille mathieu@basille.org

See Also

The PostgreSQL documentation: http://www.postgresql.org/docs/current/static/sql-createschema.html

Examples

## Not run: 
    dbSchema(conn, name = "schema", exec = FALSE)

## End(Not run)

rpostgis documentation built on Nov. 20, 2023, 5:07 p.m.