From: Brandon Black <blblack@gmail.com>
Date: Tue, 31 Jan 2006 05:20:29 +0000 (+0000)
Subject: silence postgres create table jabber
X-Git-Tag: 0.03000~28
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ddf9132271bacae690c871034e5e42beb59464fa;p=dbsrgits%2FDBIx-Class-Schema-Loader.git

silence postgres create table jabber
---

diff --git a/t/dbixcsl_common_tests.pm b/t/dbixcsl_common_tests.pm
index 0e05127..d3163c9 100644
--- a/t/dbixcsl_common_tests.pm
+++ b/t/dbixcsl_common_tests.pm
@@ -449,6 +449,13 @@ sub create {
     $self->{created} = 1;
 
     my $dbh = $self->dbconnect(1);
+
+    # Silence annoying but harmless postgres "NOTICE:  CREATE TABLE..."
+    local $SIG{__WARN__} = sub {
+        my $msg = shift;
+        print STDERR $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