(curs, tbl)
return map(lambda x: x[0], curs.fetchall())
Return list of column names for table.
Return list of column names for table.
Return list of column names for table .
def get_table_columns(curs, tbl):
    """Return list of column names for table."""
    oid = get_table_oid(curs, tbl)
    q = "SELECT k.attname FROM pg_attribute k"\
        " WHERE k.attrelid = %s"\
        "   AND k.attnum > 0 AND NOT k.attisdropped"\
        " ORDER BY k.attnum"
    curs.execute(q, [oid])
    return map(lambda x: x[0], curs.fetchall())
def get_table_columns ( curs , tbl ) : oid = get_table_oid ( curs , tbl ) q = "SELECT k.attname FROM pg_attribute k" " WHERE k.attrelid = %s" "   AND k.attnum > 0 AND NOT k.attisdropped" " ORDER BY k.attnum" curs . execute ( q , [ oid ] ) return map ( lambda x : x [ 0 ] , curs . fetchall ( ) )