diff options
author | mkanat%kerio.com <> | 2005-07-13 13:04:13 +0200 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-07-13 13:04:13 +0200 |
commit | b443446846f74576500604e4faa3a87a8642151a (patch) | |
tree | ccbe117be5dbe55ce3b83ab5f3481b4248de57ee | |
parent | f1923f8e85501143d0be63d872c726159440f6c1 (diff) | |
download | bugzilla-b443446846f74576500604e4faa3a87a8642151a.tar.gz bugzilla-b443446846f74576500604e4faa3a87a8642151a.tar.xz |
Bug 300311: [PostgreSQL] bz_table_list_real returns PostgreSQL system tables in addition to normal Bugzilla tables
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=glob, a=justdave
-rw-r--r-- | Bugzilla/DB/Pg.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 97473e564..c8ff4221b 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -214,4 +214,19 @@ sub bz_setup_database { $self->bz_drop_index('longdescs', 'longdescs_thetext_idx'); } +##################################################################### +# Custom Schema Information Functions +##################################################################### + +# Pg includes the PostgreSQL system tables in table_list_real, so +# we need to remove those. +sub bz_table_list_real { + my $self = shift; + + my @full_table_list = $self->SUPER::bz_table_list_real(@_); + # All PostgreSQL system tables start with "pg_" or "sql_" + my @table_list = grep(!/(^pg_)|(^sql_)/, @full_table_list); + return @table_list; +} + 1; |