);
{
- # Silence annoying but harmless postgres "NOTICE: CREATE TABLE..."
- local $SIG{__WARN__} = sub {
- my $msg = shift;
- warn $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
- };
-
my $dbh = $self->dbconnect(1);
$dbh->do($_) for @statements_rescan;
$dbh->disconnect;
AutoCommit => 1,
}
);
+ if ($self->{dsn} =~ /^[^:]+:SQLite:/) {
+ $dbh->do ('PRAGMA synchronous = OFF');
+ }
+ elsif ($self->{dsn} =~ /^[^:]+:Pg:/) {
+ $dbh->do ('SET client_min_messages=WARNING');
+ }
die "Failed to connect to database: $DBI::errstr" if !$dbh;
my $dbh = $self->dbconnect(1);
- # Silence annoying but harmless postgres "NOTICE: CREATE TABLE..."
- local $SIG{__WARN__} = sub {
- my $msg = shift;
- warn $msg unless $msg =~ m{^NOTICE:\s+CREATE TABLE};
- };
-
$dbh->do($_) for (@statements);
unless($self->{skip_rels}) {
# hack for now, since DB2 doesn't like inline comments, and we need