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

# 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,logical
dbQuoteLiteral(conn, x, ...)

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

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

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

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

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

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

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

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

# S4 method for PqConnection,character
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

# For running the examples on systems without PostgreSQL connection: run <- postgresHasDefault()
#> Could not initialise default postgres database. If postgres is running #> check that the environment variables PGHOST, PGPORT, #> PGUSER, PGPASSWORD, and PGDATABASE, are defined and #> point to your database.
library(DBI) if (run) con <- dbConnect(RPostgres::Postgres()) x <- c("a", "b c", "d'e", "\\f") if (run) dbQuoteString(con, x) if (run) dbQuoteIdentifier(con, x) if (run) dbDisconnect(con)