Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCRdj-0005vs-BY for pgsql-docs@arkaria.postgresql.org; Mon, 23 Sep 2019 16:56:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iCRdh-0005vo-1a for pgsql-docs@arkaria.postgresql.org; Mon, 23 Sep 2019 16:56:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCRdg-0005vh-Qu for pgsql-docs@lists.postgresql.org; Mon, 23 Sep 2019 16:56:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCRde-0005VC-Hv for pgsql-docs@lists.postgresql.org; Mon, 23 Sep 2019 16:56:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8NGuaZD010214; Mon, 23 Sep 2019 12:56:36 -0400 From: Tom Lane To: "David G. Johnston" cc: php.pl.prices@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: @> (contains) In-reply-to: References: <156614120484.1310.310161642239149585@wrigleys.postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Sun, 18 Aug 2019 09:19:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10212.1569257796.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Sep 2019 12:56:36 -0400 Message-ID: <10213.1569257796@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "David G. Johnston" writes: > On Sun, Aug 18, 2019 at 8:53 AM PG Doc comments form >> Noticed strange thin with @> >> Query "select '{1,2}'::int[] @> '{1,2,2,2,2,2,2,2}'::int[]" returns tru= e, >> but first array contains even less elements then second. >> I think it's a bug in "contains" logic, but don't know where to submit = it. > Its a valid interpretation of "contains", for this purpose each array is > treated like a set (ignoring the cardinality of elements, and overall > dimensionality), but it needs to be documented as behaving that way on t= hat > page. Done now. regards, tom lane