class PgConn::SessionMethods

def enabled?(database)

Return true if the given database accepts connections
def enabled?(database)
  !database.nil? or raise ArgumentError
  conn.value "select datallowconn from pg_catalog.pg_database where datname = '#{database}'"
end