pg version 0.19.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 9.1 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
- Drop support for Ruby 1.9
### Enhancements
- Respect and convert character encoding of all strings sent
to the server. #231
- Add PostgreSQL-9.5 functions PQsslInUse(), PQsslAttribute()
and PQsslAttributeNames().
- Various documentation fixes and improvements.
- Add mechanism to build without pg_config:
gem install pg -- --with-pg-config=ignore
- Update Windows binary gems to Ruby-2.3, PostgreSQL 9.5.4 and
OpenSSL 1.0.2f.
- Add JSON coders and add them to BasicTypeMapForResults and
BasicTypeMapBasedOnResult
- Allow build from git per bundler.
### Bugfixes
- Release GVL while calling PQsetClientEncoding(). #245
- Add `__EXTENSIONS__` to Solaris/SmartOS for Ruby >= 2.3.x. #236
- Fix wrong exception when running SQL while in Connection#copy_data
block for output
···
--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://faeriemud.org/>