def get_comment(conn, table, field):
 rows = query(conn, '\n        SELECT d.description AS comment\n        FROM pg_class c\n        JOIN pg_description d ON c.oid=d.objoid\n        JOIN pg_attribute a ON c.oid = a.attrelid\n        WHERE c.relname=%s AND a.attname=%s\n        AND a.attnum = d.objsubid\n        ;', table, field['column_name'])
 return ((rows and rows[0]['comment']) or None)

def get_comment ( conn , table , field ) : rows = query ( conn , '\n        SELECT d.description AS comment\n        FROM pg_class c\n        JOIN pg_description d ON c.oid=d.objoid\n        JOIN pg_attribute a ON c.oid = a.attrelid\n        WHERE c.relname=%s AND a.attname=%s\n        AND a.attnum = d.objsubid\n        ;' , table , field [ 'column_name' ] ) return ( ( rows and rows [ 0 ] [ 'comment' ] ) or None )
find the column comment .