postgresql_16:8.18.5 Examples
PostgreSQL 16 > Internals > SP-GiST Indexes > Examples
The PostgreSQL source distribution includes several examples of index operator classes for SP-GiST, as described in (see spgist-builtin-opclasses-table). Look into src/backend/access/spgist/ and src/backend/utils/adt/ to see the code.