RubyGems.org

pg

0.13.0

Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]. It works with {PostgreSQL 8.3 and later}[http://bit.ly/6AfPhm]. 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

installgem install pg -v 0.13.0
Authors

Michael Granger

5,113,821 total downloads 16,372 for this version
Owners

Feef2024584d97a97338b964661ca795Abc11c007a3a284272d261b2dae6376e04cdb622ce0aac272b61f23f373e2abf

Gemfile
gem "pg", "~> 0.13.0"
Versions
  1. 0.15.1 April 8, 2013
  2. 0.15.1 April 8, 2013 x64-mingw32
  3. 0.15.1 April 8, 2013 x86-mingw32
  4. 0.15.0 March 26, 2013
  5. 0.15.0 March 26, 2013 x64-mingw32
Show all versions (63 total)