Class: PGconn

Inherits:
Object
  • Object
show all
Defined in:
ext/postgres.c

Overview

******************************************************************

The class to access PostgreSQL database.

For example, to send query to the database on the localhost:
   require 'pg'
   conn = PGconn.open('dbname' => 'test1')
   res  = conn.exec('select * from a')

See the PGresult class for information on working with the results of a query.