Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVrxG-0003x9-Ng for pgsql-general@arkaria.postgresql.org; Sat, 25 Feb 2023 10:39:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pVrxE-0005Hj-Sm for pgsql-general@arkaria.postgresql.org; Sat, 25 Feb 2023 10:39:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVrxE-0005HS-Ad for pgsql-general@lists.postgresql.org; Sat, 25 Feb 2023 10:39:00 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pVrxC-0004d6-0R for pgsql-general@postgresql.org; Sat, 25 Feb 2023 10:38:59 +0000 Received: by mail-pl1-x632.google.com with SMTP id p6so1145812plf.0 for ; Sat, 25 Feb 2023 02:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=iFxXqFA1DOJ6RqRhP30StWaQRcy8AkvYrU+/u0PRasg=; b=WbWqi1MlOU2Y4r5M2+UTOQZzpU1JDzu1JzAj992/uwv1EqGCYFxy8McuxzbqYwB1WD wPy65g/B8mCXOBIDLlCG1uY2XG46Il4JRBynOqpyUVzGhTZe/FgcIyGCcVnwhRmwho51 4sbAH63fqd6kTHCtqvMLrVltJcHFEbNtt5TTrzNihsNdFWNaNrg2vOL2LSwqQerTjw8L MqM63iLZv50AwR6SuP5s3jCuXFyo8r6MaNZlr3PVdACGMzQ8BY4UgGmHrBPSulLKq9K1 IkwwMi5/o8eacWoTbL8hOCt8XG/PxvQkY7YMmBSEfCWbFYWUCChQ2veUsKEPyOcj+TDi 8prw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iFxXqFA1DOJ6RqRhP30StWaQRcy8AkvYrU+/u0PRasg=; b=GLinAHcdVkbrsqPVumSNDgsZwHtsqM36gP/RKkP3jX6N16rKYDFwmPSFl2mC+T0asJ ZrPUxr+7UTDQo663mtRhkgMNFF00e1ZOyhZmDW1b4fe/mB9v1oc9XTyYJEl0KLqdNssN fWR9gY/70qivRUy6XoCdcHszAUhixvHqdTTyr+pu2B4qcoBx7uBK+P47ibBiyO9vm0Op jpK6choK4bFtbVSyLTXtxJZInaygVFkdMzNW/4nM1sOYTtqyrfb0KllKuBZ3V6YkI50N +moUr3pXPAtOv22tCmjetcGEmMZIiqb/AlRsHy5Al3VCZ7RSvfng1R9saTlzk24teLaj e+oQ== X-Gm-Message-State: AO0yUKXMCTq+fviT+IDTQptHDiG/LUNvOUIsc9OEH1ptCQkbJ4WfIZ/n RbzqpvVktQe6kKN3YlJ2gQl8VsNMV9g= X-Google-Smtp-Source: AK7set9TZ5EYzz6K2op4a65VrWy8eaUTz1cviIYAjU4B8ODhQQLi8c+b877vn9QzniV/LbjgAcgUXQ== X-Received: by 2002:a17:902:f68e:b0:196:7bfb:f0d1 with SMTP id l14-20020a170902f68e00b001967bfbf0d1mr23217577plg.34.1677321536229; Sat, 25 Feb 2023 02:38:56 -0800 (PST) Received: from smtpclient.apple (180-150-36-87.b49624.bne.nbn.aussiebb.net. [180.150.36.87]) by smtp.gmail.com with ESMTPSA id iw19-20020a170903045300b0019c33ee4730sm725406plb.146.2023.02.25.02.38.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Feb 2023 02:38:55 -0800 (PST) From: david wheeler Content-Type: multipart/alternative; boundary="Apple-Mail=_47349FBD-29BB-4A9F-8606-FD73FF68657D" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: IS as a binary operator Message-Id: <4996BD98-0349-4871-B952-AFD8261920D0@gmail.com> Date: Sat, 25 Feb 2023 21:38:38 +1100 To: pgsql-general@postgresql.org X-Mailer: Apple Mail (2.3731.300.101.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_47349FBD-29BB-4A9F-8606-FD73FF68657D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Heya folks,=20 Recently I've been using a Kotlin library SQLDelight = which is great but = has some issues with PostgreSQL support. In particular, for null = parameters it converts `=3D` to `IS` - and it treats `IS` as a binary = operator (rather than `IS NULL` unary operator), which Postgres doesn't = like wrt prepared statements prepare test(text) as (SELECT * FROM test WHERE nullable_col IS $1); ERROR: syntax error at or near "$1" LINE 1: ...epare test(text) as (SELECT * FROM test WHERE nullable_col IS = $1); full details at [1] I=E2=80=99ve been working on a PR to use `IS NOT DISTINCT FROM` as the = `=3D` substitution for nullable parameters rather than `IS`, however = unfortunately that=E2=80=99s not universally supported either (MySQL).=20= Just wondering if anyone has other ideas? I guess there=E2=80=99s no = interest in adding support for `IS` as basically an alias for `IS NOT = DISTINCT FROM`? (and `IS NOT` for `IS DISTINCT FROM`) TIA David Wheeler [1] https://github.com/cashapp/sqldelight/issues/3863 --Apple-Mail=_47349FBD-29BB-4A9F-8606-FD73FF68657D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Heya folks, 








= --Apple-Mail=_47349FBD-29BB-4A9F-8606-FD73FF68657D--