From: rbt Date: Mon, 18 Apr 2005 23:53:52 +0000 (+0000) Subject: Fix GraphViz foreign key links (they were missing). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df5b40ec511c0ea85a2a20e0184db299122c62ee;p=postgresql-autodoc Fix GraphViz foreign key links (they were missing). --- diff --git a/postgresql_autodoc.pl b/postgresql_autodoc.pl index 60f2503..00c1cee 100755 --- a/postgresql_autodoc.pl +++ b/postgresql_autodoc.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -- # -*- Perl -*-w -# $Header: /cvsroot/autodoc/autodoc/postgresql_autodoc.pl,v 1.9 2005/02/27 19:39:15 rbt Exp $ +# $Header: /cvsroot/autodoc/autodoc/postgresql_autodoc.pl,v 1.10 2005/04/18 23:53:52 rbt Exp $ # Imported 1.22 2002/02/08 17:09:48 into sourceforge # Postgres Auto-Doc Version 1.25 @@ -1190,6 +1190,19 @@ sub info_collect($$$$$) $struct->{$namespace}{'SCHEMA'}{'COMMENT'} = $comment; } + $sth_Columns->finish(); + $sth_Constraint->finish(); + $sth_Database->finish(); + $sth_Foreign_Keys->finish(); + $sth_Foreign_Key_Arg->finish(); + $sth_Function->finish(); + $sth_FunctionArg->finish(); + $sth_Indexes->finish(); + $sth_Primary_Keys->finish(); + $sth_Schema->finish(); + $sth_Tables->finish(); + $sth_Table_Statistics->finish(); + } ## end sub info_collect($$$$$) ##### @@ -1351,6 +1364,10 @@ sub write_using_templates($$$$$) $struct->{$schema}{'TABLE'}{$table}{'COLUMN'}{$column} {'TYPE'} ), + column_type_dot => graphviz( + $struct->{$schema}{'TABLE'}{$table}{'COLUMN'}{$column} + {'TYPE'} + ), column_constraints => \@colconstraints, }; @@ -1654,7 +1671,7 @@ sub write_using_templates($$$$$) my @fk_links; my @fkeys; foreach my $schema ( sort keys %{$struct} ) { - foreach my $table ( sort keys %{ $struct->{$schema} } ) { + foreach my $table ( sort keys %{ $struct->{$schema}{'TABLE'} } ) { foreach my $column ( sort { $struct->{$schema}{'TABLE'}{$table}{'COLUMN'}{$a}