Skip to content

Instantly share code, notes, and snippets.

@tanordheim
Created February 28, 2013 10:33
Show Gist options
  • Save tanordheim/5055789 to your computer and use it in GitHub Desktop.
Save tanordheim/5055789 to your computer and use it in GitHub Desktop.
conn = PG::Connection.new(host: "localhost", dbname: "test")
conn.exec("SELECT * FROM table") do |result|
result.each do |row|
puts row["id"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment