MobilityDB 1.1

◆ namestrcmp()

int namestrcmp ( Name  name,
const char *  str 
)

Create a cache of PostgreSQL type and operator Oids in global arrays to avoid (slow) lookups.

The arrays are initialized when the extension is loaded.

The selectivity of Boolean operators is essential to determine efficient execution plans for queries. The extension defines several classes of Boolean operators (equal, less than, overlaps, ...), each of which can have as left or right arguments a built-in type (such as integer, timestamptz, geometry, ...) or a type defined by the extension (such as tstzspan, tint, ...).

As of January 2023 there are 1470 operators defined in MobilityDB. We need to translate between operator Oid <-> MEOS operator info both ways. For Oid -> MEOS operator we use a hash table with Oid as key. For MEOS operator info -> Oid we use a three-dimensional array containing all possible combinations of operator/left argument/right argument. The invalid combinations are initialized to 0.