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 1qhZL5-003XH3-De for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Sep 2023 17:44:15 +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 1qhZL1-00Glkx-JI for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Sep 2023 17:44:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qhZL1-00GlkV-1n for pgsql-hackers@lists.postgresql.org; Sat, 16 Sep 2023 17:44:11 +0000 Received: from pb-smtp1.pobox.com ([64.147.108.70]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qhZKs-005Um3-Nm for pgsql-hackers@lists.postgresql.org; Sat, 16 Sep 2023 17:44:09 +0000 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 5A5991AA958; Sat, 16 Sep 2023 13:43:59 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; s=sasl; bh=nHjtFYO7S9TWs4AVnx6TLVsmmR U8sOtIMrPoRUAFEo4=; b=cqGRHir6MlSOy8asPioc/clfjQ4qKRS9dskUHJ4lkX O/TJE8shkQ6NO5sJfOExvPuOw+V+uyM6PHLwrnuv2U1NzXZUGpnupFkoGQVdH0Rb YHlVF7t2Kr9WDc40a1kBpifMkmdA9+4WP3P78Vhxf7UzESEeVX5nApzCm/X5k9xP c= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 427161AA957; Sat, 16 Sep 2023 13:43:59 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=justatheory.com; h=content-type:mime-version:subject:from:in-reply-to:date:cc:message-id:references:to; s=2016-12.pbsmtp; bh=nHjtFYO7S9TWs4AVnx6TLVsmmRU8sOtIMrPoRUAFEo4=; b=lvIrQb9sSEX1n6l/QWNLzHrmFFKZXVYBYAEjopkCvON8Zo3lYUUJAGeYd68HgzBYZ/9/jHdR2GMjgydSTlUFyOJSdyAca+ZjWFBGyn4l4Ma90bdpCBdrtZEyXzxU1iZm+7DvidruuscTjc+ywr0T+68XmdaOBHGiP4yH4wVowkQ= Received: from smtpclient.apple (unknown [158.222.197.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id A043C1AA956; Sat, 16 Sep 2023 13:43:58 -0400 (EDT) (envelope-from david@justatheory.com) Content-Type: multipart/signed; boundary="Apple-Mail=_9B169C02-CF3D-452E-85BF-41D8BEF2FFFF"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: JSON Path and GIN Questions From: "David E. Wheeler" In-Reply-To: <3826235.1694824574@sss.pgh.pa.us> Date: Sat, 16 Sep 2023 13:43:47 -0400 Cc: pgsql-hackers@lists.postgresql.org Message-Id: References: <15DD78A5-B5C4-4332-ACFE-55723259C07F@justatheory.com> <133696180.303713.1694566807910@office.mailbox.org> <640942d7-c996-0562-62c9-d69a4c1f9b1e@xs4all.nl> <3063408.1694666518@sss.pgh.pa.us> <3802532.1694812485@sss.pgh.pa.us> <8504C88E-A036-47F4-8FAE-9BA95F55CB03@justatheory.com> <3826235.1694824574@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3731.700.6) X-Pobox-Relay-ID: 9D6E919C-54B8-11EE-A95D-78DCEB2EC81B-76319746!pb-smtp1.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_9B169C02-CF3D-452E-85BF-41D8BEF2FFFF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Sep 15, 2023, at 20:36, Tom Lane wrote: > I think that that indicates that you're putting the info in the > wrong place. Perhaps the right answer is to insert something > more explicit in section 11.2, which is the first place where > we really spend any effort discussing what can be indexed. Fair enough. How =E2=80=99bout this? --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -120,7 +120,7 @@ CREATE INDEX test1_id_index ON test1 (id); B-tree, Hash, GiST, SP-GiST, GIN, BRIN, and the extension bloom. Each index type uses a different - algorithm that is best suited to different types of queries. + algorithm that is best suited to different types of queries and = operators. By default, the CREATE INDEX command creates B-tree indexes, which fit the most common situations. @@ -132,6 +132,14 @@ CREATE INDEX name ON = table + + + Only operators on indexed columns are considered as index = qualifications. + Functions never qualify for index usage, aside from + indexes on = expressions. + + + B-Tree --Apple-Mail=_9B169C02-CF3D-452E-85BF-41D8BEF2FFFF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd+KfmbOQis6ZycGGkt9idPjIgfEFAmUF6VMACgkQkt9idPjI gfHpzQ/+PnZFzuTA9OlJBgExZEEmjtDsldcuy2s02pISVY0O+1oo7LUep/Ydw2g9 PLu1T6HDfc76HMoywzyK5HAMxPC0hpVM9Dinlmsq8E502Sg3kIUpl4SQVN/bdhQu VdTWjdS/CvTjUYOgE/t9jVlyZAw+6i79RvZVgRk3KagFNTIYV6JpjHohu2cAO744 tktUswBiu5iHZ7VibXhtEOTMOitvYnFbzRu8tYmQl+jb/ypLlDBcU06DBPWLyKrB Iy3IopiPZEy7QXfk0okVIXhjoIyWPEDXiMAVjVfmLHVVykFAmJ0hWGMdo7BJRAXZ 02dKYtyqWcK6iTanM0fW+ZRStIykYBAWZDGqzDhs+rnCZ7tCHF0Z3ijqWghxX8S8 sHaN21pNVma9ETLSSWqCJQSFxNLGRcShd7CcvgxDRGovDOiE4Q4yg4EW8/3OP8iL dk/DOWNyxPh+Uzhm5xzF/1J/E/fncmZz4SFu/Hf8BiflH9HhOcZo83zR2faIBDow 34UreDlKfyHWTPAIcFy9WfBsIyyvKrVSqMEij8ctwbu+E+Hf6EgR+qCQAUHl0a2p +CN69B+g3eIPjT0hadKxJgJdH2zj0iajrYjJ7OWUxIrac3brti6lsximtUb4kS9u XyBOUZNV6pnwtDfwmxIQXxzyJS+2xSeuAD9HF2jPhHbUDrW8ML4= =cGA2 -----END PGP SIGNATURE----- --Apple-Mail=_9B169C02-CF3D-452E-85BF-41D8BEF2FFFF--