In OceanBase AI Database, expressions used in function-based indexes are subject to certain restrictions. This topic lists the system functions that are prohibited from being used in function-based indexes.
Non-deterministic system functions
Expressions involving the following non-deterministic system functions are prohibited from being used in function-based indexes.
| RAND | BENCHMARK | UNIX_TIMESTAMP | NOW |
| Charset | Collation | NAME_CONST | - |
Spatial system functions
The following spatial system functions are unique to OceanBase AI Database and are currently prohibited from being used in function-based indexes.
| ST_COVERS | ST_DWITHIN | PRIV_ST_BESTSRID | PRIV_ST_POINT |
| PRIV_ST_ASEWKT | PRIV_ST_BUFFER | PRIV_ST_SETSRID | PRIV_ST_ASEWKB |
Non-user-defined system functions
Non-user-defined system functions are prohibited from being used in function-based indexes by default.
Other system functions
Expressions involving the following functions are prohibited from being used in function-based indexes.
| REGEXP_REPLACE | REGEXP_SUBSTR | REGEXP_INSTR | REGEXP_LIKE |
| TIME_TO_USEC | USEC_TO_TIME | SLEEP | STATEMENT_DIGEST |
| STATEMENT_DIGEST_TEXT | NAME_CONST | DES_DECRYPT | DES_ENCRYPT |
| RAND | UUID_SHORT | BENCHMARK | RANDOM_BYTES |
| ENCRYPT | UTC_TIMESTAMP | CURRENT_TIMESTAMP | CURRENT_TIME |
| CURRENT_DATE | UNIX_TIMESTAMP | DATABASE | CURRENT_USER |
| VERSION | CONNECTION_ID | HOST_IP | RPC_PORT |
| MYSQL_PORT | ROW_COUNT | IS_SERVING_TENANT | LAST_EXECUTION_ID |
| LAST_TRACE_ID | UUID | SYSDATE | LOCALTIMESTAMP |
| OB_VERSION | ICU_VERSION | CURRENT_USER_PRIV | UTC_TIME |
| UTC_DATE | AES_ENCRYPT | AES_DECRYPT | ST_GEOMFROMWKB |
| ST_GEOMETRYFROMWKB | ST_SRID | ST_GEOMETRYFROMTEXT | ST_GEOMFROMTEXT |
| FOUND_ROWS | LAST_INSERT_ID | SYS_PRIVILEGE_CHECK | FROM_UNIX_TIME |
| EXTRACT | USER | VALIDATE_PASSWORD_STRENGTH | CHARSET |
| COLLATION | COERCIBILITY | DEFAULT | LNNVL |
| VALUES | DES_HEX_STR | WEIGHT_STRING | DUMP |