Naming of network_ops vs. inet_ops for SP-GIST - Mailing list pgsql-docs

From PG Doc comments form
Subject Naming of network_ops vs. inet_ops for SP-GIST
Date
Msg-id 167458110639.2667300.14741268666497110766@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Naming of network_ops vs. inet_ops for SP-GIST  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Naming of network_ops vs. inet_ops for SP-GIST  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/spgist-builtin-opclasses.html
Description:

I wanted to add an SP-GIST index for an inet field ip_address

In https://www.postgresql.org/docs/14/spgist-builtin-opclasses.html
network_ops is stated as the built-in opclass for (inet, inet)

On this basis, on this version of pgsql:
psql (15.1 (Debian 15.1-1.pgdg110+1), server 14.6 (Debian
14.6-1.pgdg110+1))

I entered the following command:
# create index concurrently ip_address_spgist_ban_by_ip on ban_by_ip using
spgist (ip_address network_ops);
ERROR:  operator class "network_ops" does not exist for access method
"spgist"

However, this worked:
# create index concurrently ip_address_spgist_ban_by_ip on ban_by_ip using
spgist (ip_address inet_ops);
CREATE INDEX

This created the index:
"ip_address_spgist_ban_by_ip" spgist (ip_address)
which worked as expected:
# EXPLAIN ANALYZE select * from ban_by_ip where ip_address >>= '1.2.3.4' and
now() < banuntil_datetime;
                                                               QUERY PLAN

----------------------------------------------------------------------------------------------------------------------------------------
 Index Scan using ip_address_spgist_ban_by_ip on ban_by_ip  (cost=0.14..2.57
rows=1 width=32) (actual time=0.013..0.013 rows=0 loops=1)
   Index Cond: (ip_address >>= '1.2.3.4'::inet)
   Filter: (now() < banuntil_datetime)
 Planning Time: 0.149 ms
 Execution Time: 0.027 ms
(5 rows)

I notice inet_ops, not network_ops, is mentioned in the docs for 13. Perhaps
it was renamed to network_ops in 15 but not 14?

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: https://www.postgresql.org/account/comments/new/15/sql-alterdatabase.html/
Next
From: "David G. Johnston"
Date:
Subject: Re: https://www.postgresql.org/account/comments/new/15/sql-alterdatabase.html/