]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 300311: [PostgreSQL] bz_table_list_real returns PostgreSQL system tables in addit...
authormkanat%kerio.com <>
Wed, 13 Jul 2005 11:06:03 +0000 (11:06 +0000)
committermkanat%kerio.com <>
Wed, 13 Jul 2005 11:06:03 +0000 (11:06 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=glob, a=justdave

Bugzilla/DB/Pg.pm

index 97473e564f44af010fcb806afc04634e016ee3c5..c8ff4221bf6c3e9f5313c8fbc78be88c4f10b98e 100644 (file)
@@ -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;