From: Jason Etheridge Date: Tue, 23 Jul 2013 19:01:41 +0000 (-0400) Subject: fix the type numeric tests X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3570aeccd603c0513c533950861b0921d8c671cb;p=working%2FEvergreen.git fix the type numeric tests Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/sql/Pg/make-pgtap-tests.pl b/Open-ILS/src/sql/Pg/make-pgtap-tests.pl index 7241818918..2271b8f1f4 100755 --- a/Open-ILS/src/sql/Pg/make-pgtap-tests.pl +++ b/Open-ILS/src/sql/Pg/make-pgtap-tests.pl @@ -66,6 +66,15 @@ foreach my $schema ( @schemas ) { my $col_type = $column_array->[1]; my $col_nullable = $column_array->[2]; my $col_default = $column_array->[3]; + my $col_numeric_precision = $column_array->[4]; + my $col_numeric_scale = $column_array->[5]; + if ($col_type eq 'numeric' && defined $col_numeric_precision) { + $col_type .= "($col_numeric_precision"; + if (defined $col_numeric_scale) { + $col_type .= ",$col_numeric_scale"; + } + $col_type .= ')'; + } print "\n-- -- -- column " . $dbh->quote("$schema.$table.$column") . "\n\n"; print "SELECT has_column(\n"; print "\t" . $dbh->quote($schema) . ",\n"; @@ -208,7 +217,9 @@ sub fetch_columns { column_name, data_type, is_nullable, - column_default + column_default, + numeric_precision, + numeric_scale FROM information_schema.columns WHERE table_catalog = ? AND table_schema = ?