Debian Codegraph @

doc/src/sgml/ref/drop_tsparser.sgml

raw
1 <!--
2 doc/src/sgml/ref/drop_tsparser.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="sql-droptsparser">
7 <indexterm zone="sql-droptsparser">
8 <primary>DROP TEXT SEARCH PARSER</primary>
9 </indexterm>
10
11 <refmeta>
12 <refentrytitle>DROP TEXT SEARCH PARSER</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
16
17 <refnamediv>
18 <refname>DROP TEXT SEARCH PARSER</refname>
19 <refpurpose>remove a text search parser</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23 <synopsis>
24 DROP TEXT SEARCH PARSER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ CASCADE | RESTRICT ]
25 </synopsis>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para>
32 <command>DROP TEXT SEARCH PARSER</command> drops an existing text search
33 parser. You must be a superuser to use this command.
34 </para>
35 </refsect1>
36
37 <refsect1>
38 <title>Parameters</title>
39
40 <variablelist>
41
42 <varlistentry>
43 <term><literal>IF EXISTS</literal></term>
44 <listitem>
45 <para>
46 Do not throw an error if the text search parser does not exist.
47 A notice is issued in this case.
48 </para>
49 </listitem>
50 </varlistentry>
51
52 <varlistentry>
53 <term><replaceable class="parameter">name</replaceable></term>
54 <listitem>
55 <para>
56 The name (optionally schema-qualified) of an existing text search parser.
57 </para>
58 </listitem>
59 </varlistentry>
60
61 <varlistentry>
62 <term><literal>CASCADE</literal></term>
63 <listitem>
64 <para>
65 Automatically drop objects that depend on the text search parser,
66 and in turn all objects that depend on those objects
67 (see <xref linkend="ddl-depend"/>).
68 </para>
69 </listitem>
70 </varlistentry>
71
72 <varlistentry>
73 <term><literal>RESTRICT</literal></term>
74 <listitem>
75 <para>
76 Refuse to drop the text search parser if any objects depend on it.
77 This is the default.
78 </para>
79 </listitem>
80 </varlistentry>
81 </variablelist>
82 </refsect1>
83
84 <refsect1>
85 <title>Examples</title>
86
87 <para>
88 Remove the text search parser <literal>my_parser</literal>:
89
90 <programlisting>
91 DROP TEXT SEARCH PARSER my_parser;
92 </programlisting>
93
94 This command will not succeed if there are any existing text search
95 configurations that use the parser. Add <literal>CASCADE</literal> to
96 drop such configurations along with the parser.
97 </para>
98 </refsect1>
99
100 <refsect1>
101 <title>Compatibility</title>
102
103 <para>
104 There is no <command>DROP TEXT SEARCH PARSER</command> statement in the
105 SQL standard.
106 </para>
107 </refsect1>
108
109 <refsect1>
110 <title>See Also</title>
111
112 <simplelist type="inline">
113 <member><xref linkend="sql-altertsparser"/></member>
114 <member><xref linkend="sql-createtsparser"/></member>
115 </simplelist>
116 </refsect1>
117
118 </refentry>