Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFhUX-0002tx-Dg for pgsql-docs@arkaria.postgresql.org; Sun, 24 Jul 2022 19:42:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oFhTX-00062Y-MB for pgsql-docs@arkaria.postgresql.org; Sun, 24 Jul 2022 19:41:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFhTX-00062P-9M for pgsql-docs@lists.postgresql.org; Sun, 24 Jul 2022 19:41:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFhTU-0003aD-Rd for pgsql-docs@lists.postgresql.org; Sun, 24 Jul 2022 19:41:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26OJfBYK1738248; Sun, 24 Jul 2022 15:41:11 -0400 From: Tom Lane To: eric.mutta@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: Bug in code sample in "8.15.5. Searching in Arrays" In-reply-to: <165852967722.271454.6988634580136979082@wrigleys.postgresql.org> References: <165852967722.271454.6988634580136979082@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Fri, 22 Jul 2022 22:41:17 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1738246.1658691671.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 24 Jul 2022 15:41:11 -0400 Message-ID: <1738247.1658691671@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Doc comments form writes: > The section on array searching here: > https://www.postgresql.org/docs/current/arrays.html#ARRAYS-SEARCHI= NG > ...says "In addition, you can find rows where the array has all values e= qual > to 10000 with:" and gives the following code example: > SELECT * FROM sal_emp WHERE 10000 =3D ALL (pay_by_quarter); Yeah ... > ...however the docs for "ALL" over here: > https://www.postgresql.org/docs/current/functions-comparisons.html#id-1.= 5.8.30.17 > ...explicitly say that "The result of ALL is =E2=80=9Ctrue=E2=80=9D if a= ll comparisons yield > true (including the case where the array has zero elements)." I don't see any conflict there. regards, tom lane