Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qc5tT-00DoJv-34 for pgsql-docs@arkaria.postgresql.org; Fri, 01 Sep 2023 15:17:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qc5tQ-00FTxX-Ok for pgsql-docs@arkaria.postgresql.org; Fri, 01 Sep 2023 15:17:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qc5tQ-00FTxB-5l for pgsql-docs@lists.postgresql.org; Fri, 01 Sep 2023 15:17:04 +0000 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qc5tK-002AuY-Mg for pgsql-docs@lists.postgresql.org; Fri, 01 Sep 2023 15:17:02 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4RchTK1YMSz9sTj; Fri, 1 Sep 2023 17:16:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1693581413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EWU8XOA6wdhUnBLCXkIkZ9Q3cXKQcmM+TaZ1Y7yy6Ag=; b=gMxtgi+zrbv/jl5X96W9DZ4OuKgv5uLE6qi82wycm0VEcWHAV6qpxla2hNVFPaLavVuAM7 Q77NR7vHnJT6Z0gLvNOC8Rujq0eloydgMabq0Bm8m+roJraQsXovYFwDerYhCKOHYgWfHD JrT3FfzQyuvJsMeHiYaE/beWve5fYPy+JQJQOfGC+GciTo+X9WGZlW0PeAlD5hVJlIVexJ 1BgfyEqIcJEDF+VGl1BDZgmjKfWXbUncjPm0L0k8Gn6RPe7KkNjOElIPqnJlUuodbH8dEi zNkaMl9zqXGSliBihYJSUv6JD33IoQVTeO68DfqdkUvJfnvSP0gdLO6pOjXj1w== Date: Fri, 1 Sep 2023 17:16:52 +0200 (CEST) From: Erik Wienhold To: evasquezg97@gmail.com, pgsql-docs@lists.postgresql.org Message-ID: <2000743697.23098.1693581412642@office.mailbox.org> In-Reply-To: <169343819690.621.1560145208256468582@wrigleys.postgresql.org> References: <169343819690.621.1560145208256468582@wrigleys.postgresql.org> Subject: Re: Error in Example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 31/08/2023 01:29 CEST PG Doc comments form wrote: > Page: https://www.postgresql.org/docs/15/indexes-partial.html > Description: > > The IP addresses used to exemplify which one will be covered by the partial > index are inverted. No, the example is correct. It's about only indexing addresses outside some hypothetical organization's subnet 192.168.100.0/24. Notice that the index predicate is negated. Of course the predicate could be written without inverting the range: WHERE (client_ip <= inet '192.168.100.0' OR client_ip >= inet '192.168.100.255') -- Erik