ruby-pg: Ruby interface to PostgreSQL RDBMS

This is the extension library to access a PostgreSQL database from Ruby. This library works with PostgreSQL 7.4 and later.

Requirements

  • Ruby 1.8.7-p174 or later.

  • PostgreSQL 7.4 or later installed.

It may work with earlier versions as well, but those are not regularly tested.

How To Install

Install via RubyGems:

gem install pg

Or install from source:

rake install

You may need to specify the path to the ‘pg_config’ program installed with Postgres:

rake -- --with-pg-config=<path to pg_config>

For example, on a Mac with PostgreSQL installed via MacPorts (port install postgresql84):

rake install -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config

See README.OS_X for more information about installing under MacOS X, and README.windows for Windows build/installation instructions.

Copying

This library is copyrighted by the authors.

Authors:

Thanks to:

Maintainers:

You may redistribute this software under the terms of the Ruby license, included in the file “LICENSE”. The Ruby license also allows distribution under the terms of the GPL, included in the file “GPL”.

Portions of the code are from the PostgreSQL project, and are distributed under the terms of the BSD license, included in the file “BSD”.

Portions copyright LAIKA, Inc.

Acknowledgments

We are thankful to the people at the ruby-list and ruby-dev mailing lists. And to the people who developed PostgreSQL.