162 |
# print Dumper($tr); |
# print Dumper($tr); |
163 |
} |
} |
164 |
|
|
165 |
# all colums (for insert) |
# all columns (for insert) |
166 |
my @cols = @{$mscheme->cols($table)}; |
my @cols = @{$mscheme->cols($table)}; |
167 |
|
|
168 |
# colums compared by a=b |
# columns compared by a=b |
169 |
my @cols_notnull = @{$mscheme->cols_notnull($table)}; |
my @cols_notnull = @{$mscheme->cols_notnull($table)}; |
170 |
|
|
171 |
# colums compared by a=b or a is null and b is null |
# columns compared by a=b or a is null and b is null |
172 |
my @cols_null = @{$mscheme->cols_null($table)}; |
my @cols_null = @{$mscheme->cols_null($table)}; |
173 |
|
|
174 |
# primary key columns |
# primary key columns |
178 |
my @cols_cmp = @{$mscheme->cols_notpk($table)}; |
my @cols_cmp = @{$mscheme->cols_notpk($table)}; |
179 |
|
|
180 |
my @cols_skip; # skipped columns |
my @cols_skip; # skipped columns |
181 |
my @cols_test; # all colums to test (without skipped) |
my @cols_test; # all columns to test (without skipped) |
182 |
|
|
183 |
foreach my $row (@{$mscheme->pg_attribute($table)}) { |
foreach my $row (@{$mscheme->pg_attribute($table)}) { |
184 |
# attname format_type attnotnull atthasdef attnum default references |
# attname format_type attnotnull atthasdef attnum default references |
407 |
|
|
408 |
if ($verbose) { |
if ($verbose) { |
409 |
if ($diff_total == 0) { |
if ($diff_total == 0) { |
410 |
print STDERR "databases are same"; |
print STDERR "databases are same\n"; |
411 |
} elsif ($diff_total > 0) { |
} elsif ($diff_total > 0) { |
412 |
print STDERR "$diff_total differences in all tables\n"; |
print STDERR "$diff_total differences in all tables\n"; |
413 |
} else { |
} else { |