Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A465A153F352 for ; Mon, 9 Apr 2012 13:16:45 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHHGl-0003Uu-3S for pgsql-bugs@postgresql.org; Mon, 09 Apr 2012 16:16:44 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q39GGTrY008742; Mon, 9 Apr 2012 12:16:29 -0400 (EDT) To: Robert Haas cc: kontakt@sandberg-consult.dk, pgsql-bugs@postgresql.org Subject: Re: BUG #6530: intarray documentation could do with a warning about operators In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Mon, 09 Apr 2012 10:08:57 -0400" Date: Mon, 09 Apr 2012 12:16:29 -0400 Message-ID: <8741.1333988189@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/46 X-Sequence-Number: 32797 Robert Haas writes: > We do have this: > > The operators &&, @> and > <@ are equivalent to PostgreSQL's built-in > operators of the same names, except that they work only on integer arrays > that do not contain nulls, while the built-in operators work for any array > type. This restriction makes them faster than the built-in operators > in many cases. > > But maybe some more explicit warning is needed. Not sure exactly what. I think the gripe is basically that, while these operators might be equivalent to the built-in ones as far as results go, they are not equivalent in terms of their ability to match to indexes. But not sure how we turn that observation into useful documentation. regards, tom lane