Re: lots of values for IN() clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
Cc: "Markus Schiltknecht" <markus(at)bluegap(dot)ch>, "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: lots of values for IN() clause
Date: 2006-11-02 16:39:22
Message-ID: 17527.1162485562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> writes:
> But I do not understand why the IN list has to make so many recursive
> calls???

Existing releases effectively expand "foo IN (1,2,3,...)" to
"(((foo = 1) OR foo = 2) OR foo = 3) ..." which can be a deeply
nested OR structure. IIRC this is changed in 8.2.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-11-02 16:44:04 Re: lots of values for IN() clause
Previous Message Benjamin Weaver 2006-11-02 16:36:49 explosion of tiny tables representing multiple fields--Is this necessary?