diff options
author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2007-11-09 15:32:21 +0100 |
---|---|---|
committer | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2007-11-09 15:32:21 +0100 |
commit | 1f8fab8ead2dccfc9857b5d9ecdebd71cfaaa334 (patch) | |
tree | 1259502f8827c9dfdcafb0cdb44d80a7d5d6d2df | |
parent | ed14fb826b0e4c0c237e703fe4d8d1abb6c28032 (diff) | |
download | logilab-common-1f8fab8ead2dccfc9857b5d9ecdebd71cfaaa334.tar.gz |
list_tables() should return a list of tablenames
-rw-r--r-- | adbh.py | 4 | ||||
-rw-r--r-- | logging_ext.py | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -335,7 +335,7 @@ class _PGAdvFuncHelper(_GenericAdvFuncHelper): def list_tables(self, cursor): """return the list of tables of a database""" cursor.execute("SELECT tablename FROM pg_tables") - return cursor.fetchall() + return [r[0] for r in cursor.fetchall()] def create_language(self, cursor, extlang): """postgres specific method to install a procedural language on a database""" @@ -363,7 +363,7 @@ class _SqliteAdvFuncHelper(_GenericAdvFuncHelper): """return the list of tables of a database""" # filter type='table' else we get indices as well cursor.execute("SELECT name FROM sqlite_master WHERE type='table'") - return cursor.fetchall( ) + return [r[0] for r in cursor.fetchall()] class _MyAdvFuncHelper(_GenericAdvFuncHelper): """Postgres helper, taking advantage of postgres SEQUENCE support diff --git a/logging_ext.py b/logging_ext.py index dee73a6..a3624ae 100644 --- a/logging_ext.py +++ b/logging_ext.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (c) 2006 LOGILAB S.A. (Paris, FRANCE). +# Copyright (c) 2007 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify |