pg logo
/ rubygems package


Pg is the Ruby interface to the {PostgreSQL RDBMS}[]
+ 1

What is pg?

Pg is the Ruby interface to the {PostgreSQL RDBMS}[]. It works with {PostgreSQL 9.2 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') end end.
pg is a tool in the RubyGems Packages category of a tech stack.
pg is an open source tool with 634 GitHub stars and 148 GitHub forks. Here’s a link to pg's open source repository on GitHub

Who uses pg?

11 companies reportedly use pg in their tech stacks, including Ruby Gems, Identity Cache, and Api.

15 developers on StackShare have stated that they use pg.

Built For

pg Comparisons

Related Comparisons
No related comparisons found

pg's Followers
1 developers follow pg to keep up with related blogs and decisions.