CREATE_TEXT_SEARCH_TEMPLATE(7pg13)
π NAME π
okay bestie, welcome to the CREATE_TEXT_SEARCH_TEMPLATE(7pg13) manual page β this is the text-search-template zone β¨
CREATE_TEXT_SEARCH_TEMPLATE β define a new text search template π
β¨ SYNOPSIS β¨
CREATE TEXT SEARCH TEMPLATE name (
[ INIT = init_function , ]
LEXIZE = lexize_function
)
π¦ DESCRIPTION π¦
So CREATE TEXT SEARCH TEMPLATE creates a new text search template, no cap. Text search templates define the functions that implement text search dictionaries. A template is not useful by itself, bestie β it must be instantiated as a dictionary to actually be used. And that dictionary typically specifies parameters to be given to the template functions. iykyk π«Ά
If a schema name is given, then the text search template is created in the specified schema. Otherwise? Itβs created in the current schema. Simple as that πΈ
You must be a superuser to use CREATE TEXT SEARCH TEMPLATE. This restriction is made because an erroneous text search template definition could confuse or even crash the server π β yes, fr fr, server stability is the main character here.
The reason for separating templates from dictionaries is that a template encapsulates the βunsafeβ aspects of defining a dictionary. The parameters that can be set when defining a dictionary are safe for unprivileged users to set, and so creating a dictionary need not be a privileged operation. Slay, permissions logic π
Refer to Chapter 12 for further information π
π PARAMETERS π
π name
The name of the text search template to be created. The name can be schema-qualified. periodt β¨
π init_function
The name of the init function for the template.
π lexize_function
The name of the lexize function for the template.
The function names can be schema-qualified if necessary. Argument types are not given, since the argument list for each type of function is predetermined. The lexize function is required, but the init function is optional. Rember that split, bestie π§
The arguments can appear in any order, not only the one shown above. No need to be all rigid about it π«
π COMPATIBILITY π
There is no CREATE TEXT SEARCH TEMPLATE statement in the SQL standard. The SQL standard said βnot today,β and honestly? We respect it π
π SEE ALSO π
ALTER TEXT SEARCH TEMPLATE(ALTER_TEXT_SEARCH_TEMPLATE(7))DROP TEXT SEARCH TEMPLATE(DROP_TEXT_SEARCH_TEMPLATE(7))
π thatβs the whole vibe. Source/version: PostgreSQL 13.23; date: 2025. Catch you in the next man page, bestie β periodt π β¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms