pyque/db/postgresql.py
def db_list(username=None, password=None, host=None, port=None,
        maintain_db='postgres'):
    "returns a list of all databases on this server"

    conn = _connection(username=username, password=password, host=host,
        port=port, db=maintain_db)

    cur = conn.cursor()

    cur.execute('SELECT DATNAME from pg_database')
    rows = cur.fetchall()

    conn.close()

    result = []
    for row in rows:
        result.append(row[0])

    return result
def db_list(username=None, password=None, host=None, port=None,
        maintain_db='postgres'):
    "returns a list of all databases on this server"

    conn = _connection(username=username, password=password, host=host,
        port=port, db=maintain_db)

    cur = conn.cursor()

    cur.execute('SELECT DATNAME from pg_database')
    rows = cur.fetchall()

    conn.close()

    result = []
    for row in rows:
        result.append(row[0])

    return result
def db_list ( username = None , password = None , host = None , port = None , maintain_db = 'postgres' ) : conn = _connection ( username = username , password = password , host = host , port = port , db = maintain_db ) cur = conn . cursor ( ) cur . execute ( 'SELECT DATNAME from pg_database' ) rows = cur . fetchall ( ) conn . close ( ) result = [ ] for row in rows : result . append ( row [ 0 ] ) return result
returns a list of all databases on this server
returns a list of all databases on this server