From aed66fb57ccced2cf4f572bde90c7d16d61d276c Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 18 Mar 2022 17:00:51 +0100 Subject: [PATCH] docs: specify that ANY() is available in psycopg2 too --- docs/basic/from_pg2.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/basic/from_pg2.rst b/docs/basic/from_pg2.rst index 7f2986da7..6dbc28025 100644 --- a/docs/basic/from_pg2.rst +++ b/docs/basic/from_pg2.rst @@ -160,8 +160,9 @@ array:: >>> conn.execute("SELECT * FROM foo WHERE id = ANY(%s)", [[10,20,30]]) -Note that this variant is also superior because, unlike :sql:`IN`, it works -with an empty list of values. +Note that `ANY()` can be used with ``psycopg2`` too, and has the advantage of +accepting an empty list of values too as argument, which is not supported by +the :sql:`IN` operator instead. .. __: https://www.postgresql.org/docs/current/functions-comparisons.html #id-1.5.8.30.16 -- 2.47.2