Pg is the Ruby interface to the [[http://www.postgresql.org/|PostgreSQL RDBMS]].
-It works with PostgreSQL 8.
2 and later.
+It works with PostgreSQL 8. and later.
-If you need help, there's [[http://groups.google.com/group/ruby-pg|a mailing list]] and a [[https://plus.google.com/106582181787882652415/posts|a Google+ group]] for asking questions, making suggestions, or posting hints for particular platforms.
+# Output a table of current connections to the DB
+conn = PG.connect( dbname: 'sales' )
+conn.exec( "SELECT * FROM pg_stat_activity" ) do |result|
+ puts " PID | User | Query"
+ puts " %7d | %-16s | %s " %
+ row.values_at('procpid', 'usename', 'current_query')
-* Ruby 1.8.7-p249 or later.
-* The libpq library from PostgreSQL 8.2.x or later.
+* Ruby 1.8.7-p249 or 1.9.3-p0.
+* PostgreSQL 8.3.x (with headers, -dev packages, etc).
-It may work with earlier versions as well, but those are not regularly tested.
+It may work with earlier versions as well, but those are not regularly tested.
gem install pg -- --with-pg-config=<path to pg_config>
-See [[MacOSXInstructions]] for more information about installing under MacOS X, and [[Win32Instructions]] for Windows build/installation instructions.
+See README-OS_X.rdoc for more information about installing under MacOS X, and
+README-Windows.rdoc for Windows build/installation instructions.
+There's also [[http://goo.gl/TFy1U|a Google+ group]] and a
+[[http://groups.google.com/group/ruby-pg|mailing list]] if you get stuck, or just
+want to chat about something.
-This project also maintains [[https://github.com/ged/ruby-pg|a Git mirror on Github]] for those of you who prefer that DVCS.
+You can report bugs, suggest features, or check out the source with Mercurial from this site,
+or if you prefer, there's also a [[https://github.com/ged/ruby-pg|Github mirror]].
After checking out the source, run:
-This task will install any missing dependencies, run the tests/specs, and generate the API documentation.
+This task will install any missing dependencies, run the tests/specs, and
+generate the API documentation.
+The current maintainer is Michael Granger <ged@FaerieMUD.org>.
This library is copyrighted by the authors.
+ by the authors.
+* Jeff Davis <email@example.com>
+* Guy Decoux (ts) <firstname.lastname@example.org>
+* Michael Granger <ged@FaerieMUD.org>
+* Eiji Matsumoto <email@example.com>
+* Yukihiro Matsumoto <firstname.lastname@example.org>
+* Noboru Saitou <email@example.com>
-* Yukihiro Matsumoto <firstname.lastname@example.org> - Author of Ruby.
-* Eiji Matsumoto <email@example.com> - One of users who loves Ruby.
-* Jeff Davis <firstname.lastname@example.org>
-* Noboru Saitou <email@example.com> - Past maintainer.
-* Dave Lee - Past maintainer.
-* Guy Decoux (ts) <firstname.lastname@example.org>
-* Michael Granger <ged@FaerieMUD.org>
-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 3-Clause BSD License, included in the file "BSDL".
+You may redistribute this software under the same terms as Ruby itself; see
+http://www.ruby-lang.org/en/LICENSE.txt or the LICENSE file in the source
Portions of the code are from the PostgreSQL project, and are distributed
-under the terms of the Postgre
sQL license, included in the file "POSTGRES ".
+under the terms of the PostgreQL license, included in the file POSTGRES.
Portions copyright LAIKA, Inc.
-We are thankful to the people at the ruby-list and ruby-dev mailing lists. And to the people who developed PostgreSQL.
+See Contributors.rdoc for the many additional fine people that have contributed
+to this library over the years.
+We are thankful to the people at the ruby-list and ruby-dev mailing lists.
+And to the people who developed PostgreSQL.