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

index 983efca..8f0f915 100755 (executable)
@@ -90,6 +90,9 @@ foreach my $schema ( @schemas ) {
             if ($col_type eq 'character' && defined $col_character_maximum_length) {
                 $col_type .= "($col_character_maximum_length)";
             }
+            if ($col_type eq 'ARRAY' && defined $col_udt_name) {
+                $col_type = substr($col_udt_name,1) . '[]';
+            }
 
             print "\n-- -- -- column " . $dbh->quote("$schema.$table.$column") . "\n\n";
             print "SELECT has_column(\n";