Ticket #586: Pgsql-list_tables.patch

File Pgsql-list_tables.patch, 0.6 kB (added by fleximus, 7 months ago)

Patch to list all user tables

  • kohana/system/libraries/drivers/Database/Pgsql.

    old new  
    224224 
    225225        public function list_tables() 
    226226        { 
    227                 $sql    = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \'public\''; 
     227                $sql    = 'SELECT table_schema || \'.\' || table_name FROM information_schema.tables WHERE table_schema NOT IN (\'pg_catalog\', \'information_schema\')'; 
    228228                $result = $this->query($sql)->result(FALSE, PGSQL_ASSOC); 
    229229 
    230230                $retval = array(); 
     
    649649        { 
    650650                return $this; 
    651651        } 
    652 } 
    653  No newline at end of file 
     652}