LogoopenSUSE Build Service > Projects
Sign Up | Log In

Pg is the Ruby interface to the {PostgreSQL

Pg is the Ruby interface to the {PostgreSQL
It works with {PostgreSQL 9.1 and
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')

Source Files (show merged sources derived from linked package)

Filename Size Changed Actions

Comments for home:Ximi1970:Servers:Gitlab:latest (0)

Login required, please login or signup in order to comment