Pg-0.18.0, The Ruby PostgreSQL driver

Pg is the database driver for the PostgreSQL RDBMS.

The major feature of this release is a new typecasting system written by
my co-maintainer Lars Kanis. It’s mostly for people writing other
libraries on top of database drivers such as Sequel, ActiveRecord,
Datamapper, etc., but if you’re curious there’s a good overview of the
system in the README

Here are the details of what’s in this release:


  • Fix OID to Integer mapping (it is unsigned now). #187
  • Fix possible segfault in conjunction with notice receiver. #185


  • Add an extensible type cast system.
  • A lot of performance improvements.
  • Return frozen String objects for result field names.
  • Add PG::Result#stream_each and #stream_each_row as fast helpers for
    the single row mode.
  • Add Enumerator variant to PG::Result#each and #each_row.
  • Add PG::Connection#conninfo and #hostaddr.
  • Add PG.init_openssl and PG.init_ssl methods.
  • Force zero termination for all text strings that are given to libpq.
    It raises an ArgumentError if the string contains a null byte.
  • Update Windows cross build to PostgreSQL 9.3.

Many thanks to the people like Mina Naguib, Jeremy E., Cody Cutrer,
and Sam S. who helped us test the new system, and submitted great
bug reports. A special thanks to Lars, who worked for half a year to
come up with a system that is simple yet flexible enough to let people
use whatever types they require while maintaining backward

Please do let us know if you encounter any problems, preferably via the
issue tracker ( or the Google
Groups list (Redirecting to Google Groups).

Also, please note that this will be the last version that will support
PostgreSQL 8.4, which reached its end-of-life last July
(PostgreSQL: Versioning Policy).

Michael, I know this isn’t your ‘fault’ but probably you have a better
chance of finding this than I do.

Thanks in advance!

I have come to the conclusion that something has changed in Ubuntu 14.10
that the gem installers are not taking into account. My 14.04 system
builds flawlessly.