def get_comment(conn, table, field):
    rows = query(conn, """
        SELECT d.description AS comment
        FROM pg_class c
        JOIN pg_description d ON c.oid=d.objoid
        JOIN pg_attribute a ON c.oid = a.attrelid
        WHERE c.relname=%s AND a.attname=%s
        AND a.attnum = d.objsubid
        ;""", table, field['column_name'])
    return rows and rows[0]['comment'] or None
returns (rows, cols, orientation) tuple given input
dataset/ETHPy150Open uwdata/termite-data-server/web2py/scripts/extract_pgsql_models.py/get_comment--crossover with--dataset/ETHPy150Open qtile/qtile/libqtile/layout/ratiotile.py/GridInfo.calc