Port variant | v26 |
Summary | Interface to PostgreSQL servers (v26) |
Package version | 1.2.3 |
Homepage | https://github.com/ged/ruby-pg |
Keywords | ruby |
Maintainer | Ruby Automaton |
License | Not yet specified |
Other variants | v27 | v30 |
Ravenports | Buildsheet | History |
Ravensource | Port Directory | History |
Last modified | 13 DEC 2020, 19:47:07 UTC |
Port created | 17 APR 2020, 06:17:19 UTC |
single | Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]. It works with {PostgreSQL 9.2 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 |
Build and Runtime |
postgresql12:client:standard ruby-rubygems:single:v26 |
main | mirror://RUBYGEMS/ |
No other ports depend on this one. |