diff --git a/R/Redshift.R b/R/Redshift.R index 13925f06..b714e815 100644 --- a/R/Redshift.R +++ b/R/Redshift.R @@ -1,6 +1,6 @@ #' Redshift driver/connection #' -#' Use `Redshift()` instead of `Postgres()` to connect to an AWS Redshift cluster. +#' Use `drv = Redshift()` instead of `drv = Postgres()` to connect to an AWS Redshift cluster. #' All methods in \pkg{RPostgres} and downstream packages can be called on such connections. #' Some have different behavior for Redshift connections, to ensure better interoperability. #' diff --git a/R/dbConnect_PqDriver.R b/R/dbConnect_PqDriver.R index 14614cf3..fca12c9d 100644 --- a/R/dbConnect_PqDriver.R +++ b/R/dbConnect_PqDriver.R @@ -6,16 +6,18 @@ #' #' @description #' `DBI::dbConnect()` establishes a connection to a database. -#' Set `drv = RPostgres::Postgres()` to connect to a SQL database -#' using the \pkg{RPostgres} package. +#' Set `drv = Postgres()` to connect to a PostgreSQL(-ish) database. Use `drv = +#' Redshift()` instead to connect to an AWS Redshift cluster. #' #' Manually disconnecting a connection is not necessary with \pkg{RPostgres}, #' but still recommended; #' if you delete the object containing the connection, it will be automatically #' disconnected during the next GC with a warning. #' -#' @param drv Should be set to [RPostgres::Postgres()] -#' to use the \pkg{RPostgres} package. +#' @param drv [DBI::DBIDriver-class]. Use [Postgres()] to connect to a +#' PostgreSQL(-ish) database or [Redshift()] to connect to an AWS Redshift +#' cluster. Use an existing [DBI::DBIConnection-class] object to clone an +#' existing connection. #' @param dbname Database name. If `NULL`, defaults to the user name. #' Note that this argument can only contain the database name, it will not #' be parsed as a connection string (internally, `expand_dbname` is set to diff --git a/man/Postgres.Rd b/man/Postgres.Rd index a28e952c..90cd8a77 100644 --- a/man/Postgres.Rd +++ b/man/Postgres.Rd @@ -29,8 +29,10 @@ Postgres() \S4method{dbDisconnect}{PqConnection}(conn, ...) } \arguments{ -\item{drv}{Should be set to \code{\link[=Postgres]{Postgres()}} -to use the \pkg{RPostgres} package.} +\item{drv}{\link[DBI:DBIDriver-class]{DBI::DBIDriver}. Use \code{\link[=Postgres]{Postgres()}} to connect to a +PostgreSQL(-ish) database or \code{\link[=Redshift]{Redshift()}} to connect to an AWS Redshift +cluster. Use an existing \link[DBI:DBIConnection-class]{DBI::DBIConnection} object to clone an +existing connection.} \item{dbname}{Database name. If \code{NULL}, defaults to the user name. Note that this argument can only contain the database name, it will not @@ -76,8 +78,7 @@ This setting does not change the time values returned, only their display.} } \description{ \code{DBI::dbConnect()} establishes a connection to a database. -Set \code{drv = RPostgres::Postgres()} to connect to a SQL database -using the \pkg{RPostgres} package. +Set \code{drv = Postgres()} to connect to a PostgreSQL(-ish) database. Use \code{drv = Redshift()} instead to connect to an AWS Redshift cluster. Manually disconnecting a connection is not necessary with \pkg{RPostgres}, but still recommended; diff --git a/man/Redshift.Rd b/man/Redshift.Rd index 53650ed1..cb1ea4a0 100644 --- a/man/Redshift.Rd +++ b/man/Redshift.Rd @@ -26,8 +26,10 @@ Redshift() ) } \arguments{ -\item{drv}{Should be set to \code{\link[=Postgres]{Postgres()}} -to use the \pkg{RPostgres} package.} +\item{drv}{\link[DBI:DBIDriver-class]{DBI::DBIDriver}. Use \code{\link[=Postgres]{Postgres()}} to connect to a +PostgreSQL(-ish) database or \code{\link[=Redshift]{Redshift()}} to connect to an AWS Redshift +cluster. Use an existing \link[DBI:DBIConnection-class]{DBI::DBIConnection} object to clone an +existing connection.} \item{dbname}{Database name. If \code{NULL}, defaults to the user name. Note that this argument can only contain the database name, it will not @@ -65,7 +67,7 @@ running too long.} If \code{NULL} then no timezone is set, which defaults to the server's time zone.} } \description{ -Use \code{Redshift()} instead of \code{Postgres()} to connect to an AWS Redshift cluster. +Use \code{drv = Redshift()} instead of \code{drv = Postgres()} to connect to an AWS Redshift cluster. All methods in \pkg{RPostgres} and downstream packages can be called on such connections. Some have different behavior for Redshift connections, to ensure better interoperability. }