lib/heroku/command/pg.rb
# pg:killall [DATABASE]
#
# terminates ALL connections
#
killall [DATABASE]
terminates ALL connections
killall [ DATABASE ] terminates ALL connections
def killall
    sql = %Q(
      SELECT pg_terminate_backend(#{pid_column})
      FROM pg_stat_activity
      WHERE #{pid_column} <> pg_backend_pid()
      AND #{query_column} <> '<insufficient privilege>'
    )
    puts exec_sql(sql)
  end
def killall sql = %Q(
      SELECT pg_terminate_backend(#{pid_column})
      FROM pg_stat_activity
      WHERE #{pid_column} <> pg_backend_pid()
      AND #{query_column} <> '<insufficient privilege>'
    ) puts exec_sql ( sql ) end
pg:killall [DATABASE]
terminates ALL connections
pg : killall [ DATABASE ] terminates ALL connections