]> begriffs open source - ai-pg/blob - full-docs/man7/ALTER_TEXT_SEARCH_DICTIONARY.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / ALTER_TEXT_SEARCH_DICTIONARY.7
1 '\" t
2 .\"     Title: ALTER TEXT SEARCH DICTIONARY
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "ALTER TEXT SEARCH DICTIONARY" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 ALTER_TEXT_SEARCH_DICTIONARY \- change the definition of a text search dictionary
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 ALTER TEXT SEARCH DICTIONARY \fIname\fR (
36     \fIoption\fR [ = \fIvalue\fR ] [, \&.\&.\&. ]
37 )
38 ALTER TEXT SEARCH DICTIONARY \fIname\fR RENAME TO \fInew_name\fR
39 ALTER TEXT SEARCH DICTIONARY \fIname\fR OWNER TO { \fInew_owner\fR | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
40 ALTER TEXT SEARCH DICTIONARY \fIname\fR SET SCHEMA \fInew_schema\fR
41 .fi
42 .SH "DESCRIPTION"
43 .PP
44 \fBALTER TEXT SEARCH DICTIONARY\fR
45 changes the definition of a text search dictionary\&. You can change the dictionary\*(Aqs template\-specific options, or change the dictionary\*(Aqs name or owner\&.
46 .PP
47 You must be the owner of the dictionary to use
48 \fBALTER TEXT SEARCH DICTIONARY\fR\&.
49 .SH "PARAMETERS"
50 .PP
51 \fIname\fR
52 .RS 4
53 The name (optionally schema\-qualified) of an existing text search dictionary\&.
54 .RE
55 .PP
56 \fIoption\fR
57 .RS 4
58 The name of a template\-specific option to be set for this dictionary\&.
59 .RE
60 .PP
61 \fIvalue\fR
62 .RS 4
63 The new value to use for a template\-specific option\&. If the equal sign and value are omitted, then any previous setting for the option is removed from the dictionary, allowing the default to be used\&.
64 .RE
65 .PP
66 \fInew_name\fR
67 .RS 4
68 The new name of the text search dictionary\&.
69 .RE
70 .PP
71 \fInew_owner\fR
72 .RS 4
73 The new owner of the text search dictionary\&.
74 .RE
75 .PP
76 \fInew_schema\fR
77 .RS 4
78 The new schema for the text search dictionary\&.
79 .RE
80 .PP
81 Template\-specific options can appear in any order\&.
82 .SH "EXAMPLES"
83 .PP
84 The following example command changes the stopword list for a Snowball\-based dictionary\&. Other parameters remain unchanged\&.
85 .sp
86 .if n \{\
87 .RS 4
88 .\}
89 .nf
90 ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );
91 .fi
92 .if n \{\
93 .RE
94 .\}
95 .PP
96 The following example command changes the language option to
97 dutch, and removes the stopword option entirely\&.
98 .sp
99 .if n \{\
100 .RS 4
101 .\}
102 .nf
103 ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );
104 .fi
105 .if n \{\
106 .RE
107 .\}
108 .PP
109 The following example command
110 \(lqupdates\(rq
111 the dictionary\*(Aqs definition without actually changing anything\&.
112 .sp
113 .if n \{\
114 .RS 4
115 .\}
116 .nf
117 ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );
118 .fi
119 .if n \{\
120 .RE
121 .\}
122 .sp
123 (The reason this works is that the option removal code doesn\*(Aqt complain if there is no such option\&.) This trick is useful when changing configuration files for the dictionary: the
124 \fBALTER\fR
125 will force existing database sessions to re\-read the configuration files, which otherwise they would never do if they had read them earlier\&.
126 .SH "COMPATIBILITY"
127 .PP
128 There is no
129 \fBALTER TEXT SEARCH DICTIONARY\fR
130 statement in the SQL standard\&.
131 .SH "SEE ALSO"
132 CREATE TEXT SEARCH DICTIONARY (\fBCREATE_TEXT_SEARCH_DICTIONARY\fR(7)), DROP TEXT SEARCH DICTIONARY (\fBDROP_TEXT_SEARCH_DICTIONARY\fR(7))