Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc9x7-0001hh-NL for pgsql-jdbc@arkaria.postgresql.org; Sun, 08 Jul 2018 13:42:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fc9x5-0004Pv-Sz for pgsql-jdbc@arkaria.postgresql.org; Sun, 08 Jul 2018 13:42:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc9x5-0004Po-Jr for pgsql-jdbc@lists.postgresql.org; Sun, 08 Jul 2018 13:42:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc9x2-0000Ky-WC for pgsql-jdbc@lists.postgresql.org; Sun, 08 Jul 2018 13:42:10 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w68Dg3kC000982; Sun, 8 Jul 2018 09:42:03 -0400 From: Tom Lane To: Alessandro Gherardi cc: Vladimir Sitnikov , Craig Ringer , pgsql-jdbc@lists.postgresql.org Subject: Re: IN or ANY for batch queries In-reply-to: <1813302550.684598.1531056519357@mail.yahoo.com> References: <1326195889.5524206.1527300602365.ref@mail.yahoo.com> <1326195889.5524206.1527300602365@mail.yahoo.com> <1813302550.684598.1531056519357@mail.yahoo.com> Comments: In-reply-to Alessandro Gherardi message dated "Sun, 08 Jul 2018 13:28:39 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <72384.1531057323.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 08 Jul 2018 09:42:03 -0400 Message-ID: <72385.1531057323@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alessandro Gherardi writes: > I'm trying to figure out to which class I should add this enhancement. I= deally, it should be the class associated with the earliest release of pos= tgres that supports this functionality. I tried to find out in which relea= se WHERE ... =3D ANY(?) was first implemented but have had no luck. Digging in the git history says it was 7.4: Author: Tom Lane Branch: master Release: REL7_4_BR [bee217924] 2003-06-29 00:33:44 +0000 Support expressions of the form 'scalar op ANY (array)' and 'scalar op ALL (array)', where the operator is applied between the lefthand scalar and each element of the array. The operator must yield boolean; the result of the construct is the OR or AND of the per-element results, respectively. = Original coding by Joe Conway, after an idea of Peter's. Rewritten by Tom to keep the implementation strictly separate from subqueries. regards, tom lane