|PL/R User's Guide - R Procedural Language|
|Prev||Fast Backward||Chapter 6. Database Access and Support Functions||Fast Forward||Next|
The following functions are intended to provide some level of compatibility between PL/R and RPostgreSQL (PostgreSQL DBI package). This allows, for example, a function to be first prototyped using an R client, and then easily moved to PL/R for production use.
dbConnect(DBIDriver drv, character user, character password, character host, character dbname, character port, character tty, character options)
dbSendQuery(DBIConnection conn, character sql)
fetch(DBIResult rs, integer num_rows)
dbGetQuery(DBIConnection conn, character sql)
dbReadTable(DBIConnection conn, character name)
These functions nominally work like their RPostgreSQL counterparts except that all queries are performed in the current database. Therefore all driver and connection related parameters are ignored, and dbDriver, dbConnect, dbDisconnect, and dbUnloadDriver are no-ops.