/[webpac2]/trunk/sql/mkindex.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/sql/mkindex.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 33 by dpavlin, Sat Jul 23 18:21:01 2005 UTC revision 34 by dpavlin, Tue Aug 2 00:42:04 2005 UTC
# Line 30  while (<>) { Line 30  while (<>) {
30                  $out->{index}->{$2}->{$table} = $1;                  $out->{index}->{$2}->{$table} = $1;
31          }          }
32    
33          if (/\s*inherits\s*\(\s*(\S+)\s*\)/) {          if (/\s*inherits\s*\(\s*(\S+)\s*\)/i) {
34                  $out->{inherits}->{$table} = $1;                  $out->{inherits}->{$table} = $1;
35          }          }
36    
37          if (s/^\s*(\S+)(.+?)references\s+(\S+)\s*\((\S+)\)/$1$2/i) {          if (s/^\s*(\S+)(.+?)references\s+(\S+)\s*\((\S+)\)/\t$1$2/i) {
38    #       if (/^\s*(\S+)(.+?)references\s+(\S+)\s*\((\S+)\)/) {
39                  @{ $out->{references}->{$table}->{$1} } = ( $3, $4 );                  @{ $out->{references}->{$table}->{$1} } = ( $3, $4 );
40          }          }
41    
# Line 76  ELSE Line 77  ELSE
77  END IF;  END IF;
78  END;  END;
79  \$\$ language 'plpgsql';  \$\$ language 'plpgsql';
80    CREATE TRIGGER $func BEFORE INSERT ON $table FOR EACH ROW EXECUTE PROCEDURE $func();
81  };  };
82          }          }
83  }  }

Legend:
Removed from v.33  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26