4 use DBD::Pg qw(:pg_types);
7 our @ISA = qw/Exporter/;
13 #Use domain sockets by default
14 my $dbh = DBI->connect_cached("dbi:Pg:dbname=ndawn", "ndawn", "", {AutoCommit => 0, RaiseError => 1, PrintError => 0, pg_enable_utf8 => -1});
16 #Easy to also use /etc/postgresql/pg_services.conf
17 #my $dbh = DBI->connect_cached("dbi:Pg:service=ndawn","", "", {AutoCommit => 0, RaiseError => 1, pg_enable_utf8 => 1});
19 #Need to set autocommit after, to be able to rollback old incomplete transactions.
20 $dbh->{AutoCommit} = 1;