handle ::bpchar with column_default
authorJason Etheridge <jason@esilibrary.com>
Tue, 23 Jul 2013 20:34:32 +0000 (16:34 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 23 Jul 2013 20:34:32 +0000 (16:34 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/sql/Pg/make-pgtap-tests.pl

index 8f0f915..b5665e6 100755 (executable)
@@ -77,6 +77,9 @@ foreach my $schema ( @schemas ) {
             if (defined $col_default && $col_default =~ /::text/) {
                 $col_default =~ s/^'(.*)'::text$/$1/;
             }
+            if (defined $col_default && $col_default =~ /::bpchar/) {
+                $col_default =~ s/^'(.*)'::bpchar$/$1/;
+            }
             if ($col_type eq 'numeric' && defined $col_numeric_precision) {
                 $col_type .= "($col_numeric_precision";
                 if (defined $col_numeric_scale) {