/[pgdiff]/Pg/Scheme.pm
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 /Pg/Scheme.pm

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

revision 1.2 by dpavlin, Tue Aug 12 20:38:06 2003 UTC revision 1.3 by dpavlin, Fri Aug 15 22:52:05 2003 UTC
# Line 270  sub cols_notpk { Line 270  sub cols_notpk {
270    
271          return $self->{'explained'}->{$table}->{cols_notpk};          return $self->{'explained'}->{$table}->{cols_notpk};
272  }  }
273    
274    # get active triggers
275    sub get_triggers {
276            my $self = shift;
277    
278            # find table oid
279            my $sql = "
280            SELECT tgname FROM pg_trigger
281                    WHERE tgname not like 'pg_%' and tgenabled IS TRUE
282            ";
283    
284            my $sth = $self->{'dbh'}->prepare($sql);
285            $sth->execute() || die;
286    
287            my @triggers;
288    
289            while (my ($tr) = $sth->fetchrow_array()) {
290                    push @triggers,$tr;
291            }
292            $sth->finish();
293    
294            return @triggers;
295    }
296    
297  1;  1;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26