# '5 = ALL (SELECT value FROM table)'
expr = 5 == all_(select(table.c.value))
+ When using a Python sequence with PostgreSQL, wrap it with
+ :func:`_sql.literal` to produce a SQL expression. Whether the sequence
+ can be adapted to an array parameter is DBAPI-specific::
+
+ expr = 5 == all_(literal([1, 2, 3]))
+
Comparison to NULL may work using ``None``::
None == all_(mytable.c.somearray)
# '5 = ANY (SELECT value FROM table)'
expr = 5 == any_(select(table.c.value))
+ When using a Python sequence with PostgreSQL, wrap it with
+ :func:`_sql.literal` to produce a SQL expression. Whether the sequence
+ can be adapted to an array parameter is DBAPI-specific::
+
+ expr = 5 == any_(literal([1, 2, 3]))
+
Comparison to NULL may work using ``None`` or :func:`_sql.null`::
None == any_(mytable.c.somearray)