Learn R Programming

rpostgis (version 1.0.0)

dbTableNameFix: Format input for database schema/table names.

Description

Internal rpostgis function to return common (length = 2) schema and table name vector from various table and schema + table name inputs.

Usage

dbTableNameFix(t.nm)

Arguments

t.nm
Table name string, length 1-2.

Value

character vector of length 2. Each character element is in (escaped) double-quotes.

Examples

Run this code
## Not run: 
# name<-c("schema","table")
# dbTableNameFix(name)
# 
# #default schema (public) is added to single-length characters (only table is given)
# name<-"table"
# dbTableNameFix(name)
# 
# #schema or table names with double quotes should be given exactly as they are 
# (make sure to wrap in single quotes in R):
# name<-c('sch"ema','"table"')
# dbTableNameFix(name)
# ## End(Not run)

Run the code above in your browser using DataLab