Set up a strategy function for nearest-neighbor searching
For each nearest-neighbor strategy function, there must exist a separate distance-measuring function of the same name but with a different signature. The R-tree access method calls only the distance-measuring function associated with the strategy function; the strategy function itself should not be called directly. The appearance of the strategy function in a query allows the query planner to set up a scan using the related R-tree index. You must raise an error if a user calls the strategy function directly, with a message such as, An attempt was made to use the nearest-neighbor function name as a filter during a non-index table scan. Nearest-neighbor queries require an index scan.
You must also set up the RtreeInfo support function (described in Support functions) to indicate that the strategy function is for nearest-neighbor searches, as ids_rti_092.html#ids_rti_092 shows.