Learn R Programming

RPostgres (version 1.4.0)

quote: Quote postgres strings, identifiers, and literals

Description

If an object of class Id is used for dbQuoteIdentifier(), it needs at most one table component and at most one schema component.

Usage

# S4 method for PqConnection,character
dbQuoteString(conn, x, ...)

# S4 method for PqConnection,SQL dbQuoteString(conn, x, ...)

# S4 method for PqConnection,character dbQuoteIdentifier(conn, x, ...)

# S4 method for PqConnection,SQL dbQuoteIdentifier(conn, x, ...)

# S4 method for PqConnection,Id dbQuoteIdentifier(conn, x, ...)

# S4 method for PqConnection,SQL dbUnquoteIdentifier(conn, x, ...)

# S4 method for PqConnection dbQuoteLiteral(conn, x, ...)

Arguments

conn

A '>PqConnection created by dbConnect()

x

A character vector to be quoted.

...

Other arguments needed for compatibility with generic (currently ignored).

Examples

Run this code
# NOT RUN {
library(DBI)
con <- dbConnect(RPostgres::Postgres())

x <- c("a", "b c", "d'e", "\\f")
dbQuoteString(con, x)
dbQuoteIdentifier(con, x)
dbDisconnect(con)
# }

Run the code above in your browser using DataLab