Forum: Ruby pg 0.15.0 Released

04cdb622ce0aac272b61f23f373e2abf?d=identicon&s=25 Michael Granger (michael_g71)
on 2013-03-26 15:40
(Received via mailing list)
pg version 0.15.0 has been released!

* <> (home)
* <> (mirror)
* <> (docs)

Pg is the Ruby interface to the {PostgreSQL

It works with {PostgreSQL 8.3 and later}[].

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')


== v0.15.0 [2013-03-03] Michael Granger <>


- Fix segfault in PG::Result#field_values when called with non String
- Fix encoding of messages delivered by notice callbacks.
- Fix text encoding for Connection#wait_for_notify and
- Fix 'Bad file descriptor' problems under Windows: wrong behaviour of
  #wait_for_notify() and timeout handling of #block on Ruby 1.9.

Documentation fixes:

- conn#socket() can not be used with IO.for_fd() on Windows.


- Tested under Ruby 2.0.0p0.
- Add single row mode of PostgreSQL 9.2.
- Set fallback_application_name to programm name $0. Thanks to Will
  for the patch.
- Release Ruby's GVL while calls to blocking libpq functions to allow
  concurrency in threaded applications.
- Refactor different variants of waiting for the connection socket.
- Make use of rb_thread_fd_select() on Ruby 1.9 and avoid deprecated
- Add an example of how to insert array data using a prepared statement
- Add continous integration tests on
- Add PG::Result#each_row for iterative over result sets by row. Thanks
  Aaron Patterson for the patch.
- Add a PG::Connection#socket_io method for fetching a (non-autoclosing)
  object for the connection's socket.


- Fix various specs to run on older PostgreSQL and Ruby versions.
- Avoid fork() in specs to allow usage on Windows and JRuby.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.