]> granicus.if.org Git - postgresql-autodoc/commitdiff
Keep foreign key defaults (0) when referencing a table which does not exist in our...
authorrbt <rbt>
Wed, 12 Mar 2008 18:55:11 +0000 (18:55 +0000)
committerrbt <rbt>
Wed, 12 Mar 2008 18:55:11 +0000 (18:55 +0000)
postgresql_autodoc.pl

index b43e2ecd251542d8b4f1a4c31c2e08017fb8d9bc..34b9456f0e966fb7ca058145a0360825724e8105 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 # -- # -*- Perl -*-w
-# $Header: /cvsroot/autodoc/autodoc/postgresql_autodoc.pl,v 1.18 2008/03/12 18:50:19 rbt Exp $
+# $Header: /cvsroot/autodoc/autodoc/postgresql_autodoc.pl,v 1.19 2008/03/12 18:55:11 rbt Exp $
 #  Imported 1.22 2002/02/08 17:09:48 into sourceforge
 
 # Postgres Auto-Doc Version 1.31
@@ -1544,10 +1544,10 @@ sub write_using_templates($$$$$) {
                         {
                             $ref_con =
                               $struct->{$ref_schema}{'TABLE'}{$ref_table}
-                              {'COLUMN'}{$ref_column}{'ORDER'};
+                              {'COLUMN'}{$ref_column}{'ORDER'} || 0;
                             $key_con =
                               $struct->{$schema}{'TABLE'}{$table}{'COLUMN'}
-                              {$column}{'ORDER'};
+                              {$column}{'ORDER'} || 0;
                             $keycon_offset = 1;
                         }