pg version 0.17.0 has been released!
* <https://bitbucket.org/ged/ruby-pg> (home)
* <https://github.com/ged/ruby-pg> (mirror)
* <http://deveiate.org/code/pg> (docs)
Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].
It works with {PostgreSQL 8.4 and later}[http://www.postgresql.org/support/versioning/].
A small example usage:
#!/usr/bin/env ruby
require 'pg'
# 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"
result.each do |row|
puts " %7d | %-16s | %s " %
row.values_at('procpid', 'usename', 'current_query')
end
end
Changes:
···
== v0.17.0 [2013-09-15] Michael Granger <ged@FaerieMUD.org>
Bugfixes:
- Fix crash by calling PQsend* and PQisBusy without GVL (#171).
Enhancements:
- Add method PG::Connection#copy_data.
- Add a Gemfile to allow installation of dependencies with bundler.
- Add compatibility with rake-compiler-dev-box.
- Return self from PG::Result#check instead of nil. This allows
to stack method calls.