From: 0xTiger Date: Fri, 25 Oct 2024 17:50:11 +0000 (+0100) Subject: docs: explicit wording to clarify correspondence between `IS NOT DISTINCT FROM` ... X-Git-Tag: 3.2.4~32^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2170c19d5a91881ddfb1cb524434f9d4bb3cc775;p=thirdparty%2Fpsycopg.git docs: explicit wording to clarify correspondence between `IS NOT DISTINCT FROM` & `IS` --- diff --git a/docs/basic/from_pg2.rst b/docs/basic/from_pg2.rst index 6f5e375af..ef78bb381 100644 --- a/docs/basic/from_pg2.rst +++ b/docs/basic/from_pg2.rst @@ -282,8 +282,8 @@ Testing in psql: LINE 1: select 10 is 10; ^ -What you can do instead is to use the `IS DISTINCT FROM operator`__, which -will gladly accept a placeholder:: +What you can do instead is to use :sql:`IS NOT DISTINCT FROM %s` in place of +:sql:`IS %s` (please pay attention to the awkwardly reversed :sql:`NOT`):: >>> conn.execute("SELECT * FROM foo WHERE field IS NOT DISTINCT FROM %s", [None])