Hello,
I’m trying to use dbi in place of postgres to connect to my PostgreSQL
and fetch some data. The bone of script that will do this follows
—>cut<—
#!/usr/bin/env ruby
$Id$
require 'dbi’
DBI.connect(‘DBI:Pg:dbname=testdb;host=sql’, nil, nil) do |dbh|
puts "selecting…"
end
—>cut<—
but I do not know how to say to dbi that the database is not on
localhost but on host sql. Diging arround and on the net I didn’t
found any usefull help.
···
–
Radek Hnilica
No matter how far down the wrong road you’ve gone, turn back.
Turkish proverb