RefLib

Reference library for AI

Back

postgresql_16:9.6.13.2 Usage

PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > dict_int — example full-text search dictionary for integers > Usage

Installing the dict_int extension creates a text search template intdict_template and a dictionary intdict based on it, with the default parameters. You can alter the parameters, for example mydb# ALTER TEXT SEARCH DICTIONARY intdict (MAXLEN = 4, REJECTLONG = true); ALTER TEXT SEARCH DICTIONARY or create new dictionaries based on the template.

To test the dictionary, you can try mydb# select ts_lexize('intdict', '12345678'); ts_lexize ----------- {123456} but real-world usage will involve including it in a text search configuration as described in (see postgresql_16:3.9). That might look like this: ALTER TEXT SEARCH CONFIGURATION english ALTER MAPPING FOR int, uint WITH intdict;

Back