- $self->{dbh}=DBI->connect("dbi:SQLite:dbname=$self->{dbpath}","","",
+ $self->{postgres}=0;
+
+ unless($self->{postgres})
+ {
+ die("$me: $self->{dbpath}: not found. use --init to create.\n") if(!$exists && !$init);
+ die("$me: --init used but $self->{dbpath} exists.\n") if($exists && $init);
+ }
+
+ my $connectstr="dbi:SQLite:dbname=$self->{dbpath}";
+ my ($user, $pass)=("", "");
+ if($self->{postgres})
+ {
+ $connectstr="dbi:Pg:dbname=id3fs";
+ $user="ianb";
+ $pass="foo";
+ }
+ $self->{dbh}=DBI->connect($connectstr, $user, $pass,