pg

pg

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

Rubygem pg

Total Downloads
8951469
Releases
39
Current Version
0.17.1
Released
2013-12-19 00:00:00 UTC
First Release
2008-01-28 08:00:00 UTC

Resources

Submitted Type Title
2012-09-20 14:20:56 UTC
by Christoph Olszowka
Blog Post
reefpoints.dockyard.com referencing Ruby on Rails, Active Record, and pg 2  
2012-05-23 16:05:18 UTC
by Ezekiel Templin
Blog Post
blog.hashrocket.com referencing Ruby on Rails and pg 1  
2012-04-04 12:12:21 UTC
by Christoph Olszowka
Blog Post
robots.thoughtbot.com referencing Active Record and pg 1  
2011-08-08 20:49:39 UTC
by Christoph Olszowka
Guide
rudygems.com referencing pg 1  
2011-06-02 06:59:47 UTC
by Ezekiel Templin
Blog Post
blog.hasmanythrough.com referencing Active Record, pg, and Ruby on Rails 1  
2011-06-01 16:54:54 UTC
by Christoph Olszowka
Blog Post
mentalized.net referencing Ruby on Rails, Active Record, and pg 0  
2010-12-31 13:44:00 UTC
by Christoph Olszowka
Blog Post
railsonpostgresql.com referencing Ruby on Rails, mysql, and pg 0  

Comments

There are no comments yet, be the first to write one!

Post a comment

Markdown supported
or
×

In order to continue, you must be signed in using your Github account.

If you're signing in using this account for the first time Github will ask for your permission to give access to your public user data to the Ruby Toolbox.

Although the Github Authorization page does not mention it, the request includes read-only access to your verified email address (user:email OAuth scope). This is neccessary so there's a way to notify you about comments, information about your accepted project edits and the like. You can review your notification settings on your account page once you're signed in.