Format input for database schema/table names.
Internal rpostgis function to return common (length = 2) schema and table name vector from various table and schema + table name inputs.
A connection object. Must be provided but can be set NULL, where a dummy connection will be used.
Table name string, length 1-2.
Boolean where to return (schema,table) name as database sanitized identifers (TRUE) or as regular character (FALSE)
character vector of length 2. Each character element is in (escaped) double-quotes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## Not run: name<-c("schema","table") dbTableNameFix(conn,name) #current search path schema is added to single-length character object (if only table is given) name<-"table" dbTableNameFix(conn,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(conn,name) ## End(Not run)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.