Manage connections {RPgSQL}R Documentation

Open and manage database connection

Description

db.connect establishes a connection between RPgSQL and a PostgreSQL server.
db.disconnect terminates a database connection.
db.connection.status returns the current connection status.
db.connection.open is used to check whether a connection is open.
db.error.message returns the error message most recently generated by an operation on the connection.
db.name returns the current database name.
db.host.name returns the name of the database host.
db.connection.options returns the connection options string.
db.user.name returns the user name of the current connection.
db.password returns the current connection password.
db.debug.tty returns the debugging tty.

Usage

db.connect(host=NULL, port=NULL, dbname=NULL, user=NULL, password=NULL,
authtype=NULL, options=NULL, tty=NULL, verbose=T)
db.disconnect()
db.connection.status()
db.connection.open()
db.error.message()
db.name()
db.host.name()
db.connection.options()
db.user.name()
db.password()
db.connection.port()
db.debug.tty()

Arguments

host PostgreSQL server host name
port PostgreSQL server port number
dbname database name
user database user name
password user password
authtype authentication type
options additional PostgreSQL options
tty debugging tty
verbose report some information

Details

Currently, db.connect does not return a handle, so you can only open a single connection at a time.

Author(s)

Timothy H. Keitt