'Return a list of table and view names in the current database.'

def get_table_list(self, cursor):

    cursor.execute("\n                                                SELECT    c.relname,    c.relkind\n                                                FROM    pg_catalog.pg_class    c\n                                                LEFT    JOIN    pg_catalog.pg_namespace    n    ON    n.oid    =    c.relnamespace\n                                                WHERE    c.relkind    IN    ('r',    'v')\n                                                                AND    n.nspname    NOT    IN    ('pg_catalog',    'pg_toast')\n                                                                AND    pg_catalog.pg_table_is_visible(c.oid)")
    return [TableInfo(row[0], {'r': 't', 'v': 'v'}.get(row[1])) for row in cursor.fetchall() if (row[0] not in self.ignored_tables)]
