Re: IN or ANY for batch queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alessandro Gherardi <alessandro(dot)gherardi(at)yahoo(dot)com>
Cc: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: IN or ANY for batch queries
Date: 2018-07-08 13:42:03
Message-ID: 72385.1531057323@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Alessandro Gherardi <alessandro(dot)gherardi(at)yahoo(dot)com> writes:
> I'm trying to figure out to which class I should add this enhancement. Ideally, it should be the class associated with the earliest release of postgres that supports this functionality. I tried to find out in which release WHERE ... = ANY(?) was first implemented but have had no luck.

Digging in the git history says it was 7.4:

Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2018-07-10 16:09:15 [pgjdbc/pgjdbc] da831d: perf: avoid string allocation for oid/rows parsing...
Previous Message Alessandro Gherardi 2018-07-08 13:28:39 Re: IN or ANY for batch queries