my($dbh) = DBI->connect('dbi:Pg:dbname=dbhere', 'userhere', 'passhere', { AutoCommit => 1, RaiseError => 1, }) || die("DBI->connect() failed: $DBI::errstr"); tie(%session, 'Apache::Session::Postgres', undef(), { DataSource => 'dbi:Pg:dbname=dbhere', UserName => 'userhere', Password => 'passhere', Commit => 1, });