mirror of https://github.com/postgres/postgres
pages for the new SQL commands. I also committed Bruce's text search introductory chapter, as-is except for fixing some markup errors, so that there would be a place for the reference pages to link to.REL8_3_STABLE
parent
5c681ab1cb
commit
3e3bb36ee9
@ -0,0 +1,202 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tsconfig.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-ALTERTSCONFIG"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-ALTERTSCONFIG-TITLE">ALTER TEXT SEARCH CONFIGURATION</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>ALTER TEXT SEARCH CONFIGURATION</refname> |
||||
<refpurpose>change the definition of a text search configuration</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-altertsconfig"> |
||||
<primary>ALTER TEXT SEARCH CONFIGURATION</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> ( |
||||
PARSER = <replaceable class="parameter">parser_name</replaceable> |
||||
) |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> |
||||
ADD MAPPING FOR <replaceable class="parameter">token_type</replaceable> [, ... ] WITH <replaceable class="parameter">dictionary_name</replaceable> [, ... ] |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> |
||||
ALTER MAPPING FOR <replaceable class="parameter">token_type</replaceable> [, ... ] WITH <replaceable class="parameter">dictionary_name</replaceable> [, ... ] |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> |
||||
ALTER MAPPING REPLACE <replaceable class="parameter">old_dictionary</replaceable> WITH <replaceable class="parameter">new_dictionary</replaceable> |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> |
||||
ALTER MAPPING FOR <replaceable class="parameter">token_type</replaceable> [, ... ] REPLACE <replaceable class="parameter">old_dictionary</replaceable> WITH <replaceable class="parameter">new_dictionary</replaceable> |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> |
||||
DROP MAPPING [ IF EXISTS ] FOR <replaceable class="parameter">token_type</replaceable> [, ... ] |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable> |
||||
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable> |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>ALTER TEXT SEARCH CONFIGURATION</command> changes the definition of |
||||
a text search configuration. You can change which parser it uses, modify |
||||
its mapping from token types to dictionaries, |
||||
or change the configuration's name or owner. |
||||
</para> |
||||
|
||||
<para> |
||||
You must be the owner of the configuration to use |
||||
<command>ALTER TEXT SEARCH CONFIGURATION</>. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search |
||||
configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">parser_name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of a new text search parser to use for this configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">token_type</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of a token type that is emitted by the configuration's |
||||
parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">dictionary_name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of a text search dictionary to be consulted for the |
||||
specified token type(s). If multiple dictionaries are listed, |
||||
they are consulted in the specified order. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">old_dictionary</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of a text search dictionary to be replaced in the mapping. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">old_dictionary</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of a text search dictionary to be substituted for |
||||
<replaceable class="parameter">old_dictionary</replaceable>. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">newname</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The new name of the text search configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">newowner</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The new owner of the text search configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
|
||||
<para> |
||||
The <literal>ADD MAPPING FOR</> form installs a list of dictionaries to be |
||||
consulted for the specified token type(s); it is an error if there is |
||||
already a mapping for any of the token types. |
||||
The <literal>ALTER MAPPING FOR</> form does the same, but first removing |
||||
any existing mapping for those token types. |
||||
The <literal>ALTER MAPPING REPLACE</> forms substitute <replaceable |
||||
class="parameter">new_dictionary</replaceable> for <replaceable |
||||
class="parameter">old_dictionary</replaceable> anywhere the latter appears. |
||||
This is done for only the specified token types when <literal>FOR</> |
||||
appears, or for all mappings of the configuration when it doesn't. |
||||
The <literal>DROP MAPPING</> form removes all dictionaries for the |
||||
specified token type(s), causing tokens of those types to be ignored |
||||
by the text search configuration. It is an error if there is no mapping |
||||
for the token types, unless <literal>IF EXISTS</> appears. |
||||
</para> |
||||
|
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Notes</title> |
||||
|
||||
<para> |
||||
While changing the text search parser used by a configuration is allowed, |
||||
this will only work nicely if old and new parsers use the same set of |
||||
token types. It is advisable to drop the mappings for any incompatible |
||||
token types before changing parsers. |
||||
</para> |
||||
|
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Examples</title> |
||||
|
||||
<para> |
||||
The following example replaces the <literal>english</> dictionary |
||||
with the <literal>swedish</> dictionary anywhere that <literal>english</> |
||||
is used within <literal>my_config</>. |
||||
</para> |
||||
|
||||
<programlisting> |
||||
ALTER TEXT SEARCH CONFIGURATION my_config |
||||
ALTER MAPPING REPLACE english WITH swedish; |
||||
</programlisting> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>ALTER TEXT SEARCH CONFIGURATION</command> statement in |
||||
the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-createtsconfig" endterm="sql-createtsconfig-title"></member> |
||||
<member><xref linkend="sql-droptsconfig" endterm="sql-droptsconfig-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,118 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tsdictionary.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-ALTERTSDICTIONARY"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-ALTERTSDICTIONARY-TITLE">ALTER TEXT SEARCH DICTIONARY</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>ALTER TEXT SEARCH DICTIONARY</refname> |
||||
<refpurpose>change the definition of a text search dictionary</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-altertsdictionary"> |
||||
<primary>ALTER TEXT SEARCH DICTIONARY</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> ( OPTION = <replaceable class="parameter">init_options</replaceable> ) |
||||
ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable> |
||||
ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable> |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>ALTER TEXT SEARCH DICTIONARY</command> changes the definition of |
||||
a text search dictionary. You can change the dictionary's initialization |
||||
options, or change the dictionary's name or owner. |
||||
</para> |
||||
|
||||
<para> |
||||
You must be the owner of the dictionary to use |
||||
<command>ALTER TEXT SEARCH DICTIONARY</>. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search |
||||
dictionary. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">init_options</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
A new list of initialization options, or <literal>NULL</> to |
||||
remove all options. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">newname</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The new name of the text search dictionary. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">newowner</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The new owner of the text search dictionary. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Examples</title> |
||||
|
||||
<para> |
||||
The following example command sets the language and stopword list |
||||
for a Snowball-based dictionary. |
||||
</para> |
||||
|
||||
<programlisting> |
||||
ALTER TEXT SEARCH DICTIONARY my_russian ( option = 'Language=russian, StopWords=my_russian' ); |
||||
</programlisting> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>ALTER TEXT SEARCH DICTIONARY</command> statement in |
||||
the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-createtsdictionary" endterm="sql-createtsdictionary-title"></member> |
||||
<member><xref linkend="sql-droptsdictionary" endterm="sql-droptsdictionary-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,82 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tsparser.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-ALTERTSPARSER"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-ALTERTSPARSER-TITLE">ALTER TEXT SEARCH PARSER</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>ALTER TEXT SEARCH PARSER</refname> |
||||
<refpurpose>change the definition of a text search parser</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-altertsparser"> |
||||
<primary>ALTER TEXT SEARCH PARSER</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
ALTER TEXT SEARCH PARSER <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable> |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>ALTER TEXT SEARCH PARSER</command> changes the definition of |
||||
a text search parser. Currently, the only supported functionality |
||||
is to change the parser's name. |
||||
</para> |
||||
|
||||
<para> |
||||
You must be a superuser to use <command>ALTER TEXT SEARCH PARSER</>. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">newname</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The new name of the text search parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>ALTER TEXT SEARCH PARSER</command> statement in |
||||
the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-createtsparser" endterm="sql-createtsparser-title"></member> |
||||
<member><xref linkend="sql-droptsparser" endterm="sql-droptsparser-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,82 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tstemplate.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-ALTERTSTEMPLATE"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-ALTERTSTEMPLATE-TITLE">ALTER TEXT SEARCH TEMPLATE</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>ALTER TEXT SEARCH TEMPLATE</refname> |
||||
<refpurpose>change the definition of a text search template</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-altertstemplate"> |
||||
<primary>ALTER TEXT SEARCH TEMPLATE</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
ALTER TEXT SEARCH TEMPLATE <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable> |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>ALTER TEXT SEARCH TEMPLATE</command> changes the definition of |
||||
a text search template. Currently, the only supported functionality |
||||
is to change the template's name. |
||||
</para> |
||||
|
||||
<para> |
||||
You must be a superuser to use <command>ALTER TEXT SEARCH TEMPLATE</>. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">newname</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The new name of the text search template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>ALTER TEXT SEARCH TEMPLATE</command> statement in |
||||
the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-createtstemplate" endterm="sql-createtstemplate-title"></member> |
||||
<member><xref linkend="sql-droptstemplate" endterm="sql-droptstemplate-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,126 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tsconfig.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-CREATETSCONFIG"> |
||||
<refmeta> |
||||
<refentrytitle id="sql-createtsconfig-title">CREATE TEXT SEARCH CONFIGURATION</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>CREATE TEXT SEARCH CONFIGURATION</refname> |
||||
<refpurpose>define a new text search configuration</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-createtsconfig"> |
||||
<primary>CREATE TEXT SEARCH CONFIGURATION</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
CREATE TEXT SEARCH CONFIGURATION <replaceable class="parameter">name</replaceable> ( |
||||
PARSER = <replaceable class="parameter">parser_name</replaceable> | |
||||
COPY = <replaceable class="parameter">source_config</replaceable> |
||||
) |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>CREATE TEXT SEARCH CONFIGURATION</command> creates a new text |
||||
search configuration. A text search configuration specifies a text |
||||
search parser that can divide a string into tokens, plus dictionaries |
||||
that can be used to determine which tokens are of interest for searching. |
||||
</para> |
||||
|
||||
<para> |
||||
If only the parser is specified, then the new text search configuration |
||||
initially has no mappings from token types to dictionaries, and therefore |
||||
will ignore all words. Subsequent <command>ALTER TEXT SEARCH |
||||
CONFIGURATION</command> commands must be used to create mappings to |
||||
make the configuration useful. Alternatively, an existing text search |
||||
configuration can be copied. |
||||
</para> |
||||
|
||||
<para> |
||||
If a schema name is given then the text search configuration is created in |
||||
the specified schema. Otherwise it is created in the current schema. |
||||
</para> |
||||
|
||||
<para> |
||||
The user who defines a text search configuration becomes its owner. |
||||
</para> |
||||
|
||||
<para> |
||||
Refer to <xref linkend="textsearch"> for further information. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the text search configuration to be created. The name can be |
||||
schema-qualified. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">parser_name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the text search parser to use for this configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">source_config</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of an existing text search configuration to copy. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Notes</title> |
||||
|
||||
<para> |
||||
It is allowed to specify both <literal>PARSER</> and <literal>COPY</>, |
||||
resulting in the specified parser being used with whatever mappings |
||||
are in the source configuration. This is generally inadvisable, |
||||
unless you know that both parsers involved use the same token type set. |
||||
</para> |
||||
|
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>CREATE TEXT SEARCH CONFIGURATION</command> statement |
||||
in the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertsconfig" endterm="sql-altertsconfig-title"></member> |
||||
<member><xref linkend="sql-droptsconfig" endterm="sql-droptsconfig-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,111 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tsdictionary.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-CREATETSDICTIONARY"> |
||||
<refmeta> |
||||
<refentrytitle id="sql-createtsdictionary-title">CREATE TEXT SEARCH DICTIONARY</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>CREATE TEXT SEARCH DICTIONARY</refname> |
||||
<refpurpose>define a new text search dictionary</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-createtsdictionary"> |
||||
<primary>CREATE TEXT SEARCH DICTIONARY</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
CREATE TEXT SEARCH DICTIONARY <replaceable class="parameter">name</replaceable> ( |
||||
TEMPLATE = <replaceable class="parameter">template</replaceable> |
||||
[, OPTION = <replaceable class="parameter">init_options</replaceable> ] |
||||
) |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>CREATE TEXT SEARCH DICTIONARY</command> creates a new text search |
||||
dictionary. A text search dictionary specifies a way of recognizing |
||||
interesting or uninteresting words for searching. A dictionary depends |
||||
on a text search template, which specifies the functions that actually |
||||
perform the work. Typically the dictionary provides some options that |
||||
control the detailed behavior of the template's functions. |
||||
</para> |
||||
|
||||
<para> |
||||
If a schema name is given then the text search dictionary is created in the |
||||
specified schema. Otherwise it is created in the current schema. |
||||
</para> |
||||
|
||||
<para> |
||||
The user who defines a text search dictionary becomes its owner. |
||||
</para> |
||||
|
||||
<para> |
||||
Refer to <xref linkend="textsearch"> for further information. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the text search dictionary to be created. The name can be |
||||
schema-qualified. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">template</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the text search template that will define the basic |
||||
behavior of this dictionary. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">init_options</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
A list of initialization options for the template functions. |
||||
This is a string containing <replaceable>keyword</> <literal>=</> |
||||
<replaceable>value</> pairs. The specific keywords allowed |
||||
vary depending on the text search template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>CREATE TEXT SEARCH DICTIONARY</command> statement in |
||||
the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertsdictionary" endterm="sql-altertsdictionary-title"></member> |
||||
<member><xref linkend="sql-droptsdictionary" endterm="sql-droptsdictionary-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,152 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tsparser.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-CREATETSPARSER"> |
||||
<refmeta> |
||||
<refentrytitle id="sql-createtsparser-title">CREATE TEXT SEARCH PARSER</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>CREATE TEXT SEARCH PARSER</refname> |
||||
<refpurpose>define a new text search parser</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-createtsparser"> |
||||
<primary>CREATE TEXT SEARCH PARSER</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
CREATE TEXT SEARCH PARSER <replaceable class="parameter">name</replaceable> ( |
||||
START = <replaceable class="parameter">start_function</replaceable> , |
||||
GETTOKEN = <replaceable class="parameter">gettoken_function</replaceable> , |
||||
END = <replaceable class="parameter">end_function</replaceable> , |
||||
LEXTYPES = <replaceable class="parameter">lextypes_function</replaceable> |
||||
[, HEADLINE = <replaceable class="parameter">headline_function</replaceable> ] |
||||
) |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>CREATE TEXT SEARCH PARSER</command> creates a new text search |
||||
parser. A text search parser defines a method for splitting a text |
||||
string into tokens and assigning types (categories) to the tokens. |
||||
A parser is not particularly useful by itself, but must be bound into a |
||||
text search configuration along with some text search dictionaries |
||||
to be used for searching. |
||||
</para> |
||||
|
||||
<para> |
||||
If a schema name is given then the text search parser is created in the |
||||
specified schema. Otherwise it is created in the current schema. |
||||
</para> |
||||
|
||||
<para> |
||||
You must be a superuser to use <command>CREATE TEXT SEARCH PARSER</command>. |
||||
(This restriction is made because an erroneous text search parser |
||||
definition could confuse or even crash the server.) |
||||
</para> |
||||
|
||||
<para> |
||||
Refer to <xref linkend="textsearch"> for further information. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the text search parser to be created. The name can be |
||||
schema-qualified. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">start_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the start function for the parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">gettoken_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the get-next-token function for the parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">end_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the end function for the parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">lextypes_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the lextypes function for the parser (a function that |
||||
returns information about the set of token types it produces). |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">headline_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the headline function for the parser (a function that |
||||
summarizes a set of tokens). |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
|
||||
<para> |
||||
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. All except the headline function are required. |
||||
</para> |
||||
|
||||
<para> |
||||
The arguments can appear in any order, not only the one shown above. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no |
||||
<command>CREATE TEXT SEARCH PARSER</command> statement in the SQL |
||||
standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertsparser" endterm="sql-altertsparser-title"></member> |
||||
<member><xref linkend="sql-droptsparser" endterm="sql-droptsparser-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,125 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_tstemplate.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-CREATETSTEMPLATE"> |
||||
<refmeta> |
||||
<refentrytitle id="sql-createtstemplate-title">CREATE TEXT SEARCH TEMPLATE</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>CREATE TEXT SEARCH TEMPLATE</refname> |
||||
<refpurpose>define a new text search template</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-createtstemplate"> |
||||
<primary>CREATE TEXT SEARCH TEMPLATE</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
CREATE TEXT SEARCH TEMPLATE <replaceable class="parameter">name</replaceable> ( |
||||
[ INIT = <replaceable class="parameter">init_function</replaceable> , ] |
||||
LEXIZE = <replaceable class="parameter">lexize_function</replaceable> |
||||
) |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>CREATE TEXT SEARCH TEMPLATE</command> creates a new text search |
||||
template. Text search templates define the functions that implement |
||||
text search dictionaries. A template is not useful by itself, but must |
||||
be instantiated as a dictionary to be used. The dictionary typically |
||||
specifies parameters to be given to the template functions. |
||||
</para> |
||||
|
||||
<para> |
||||
If a schema name is given then the text search template is created in the |
||||
specified schema. Otherwise it is created in the current schema. |
||||
</para> |
||||
|
||||
<para> |
||||
You must be a superuser to use <command>CREATE TEXT SEARCH |
||||
TEMPLATE</command>. This restriction is made because an erroneous text |
||||
search template definition could confuse or even crash the server. |
||||
The reason for separating templates from dictionaries is that a template |
||||
encapsulates the <quote>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. |
||||
</para> |
||||
|
||||
<para> |
||||
Refer to <xref linkend="textsearch"> for further information. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the text search template to be created. The name can be |
||||
schema-qualified. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">init_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the init function for the template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">lexize_function</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name of the lexize function for the template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
|
||||
<para> |
||||
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. |
||||
</para> |
||||
|
||||
<para> |
||||
The arguments can appear in any order, not only the one shown above. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no |
||||
<command>CREATE TEXT SEARCH TEMPLATE</command> statement in the SQL |
||||
standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertstemplate" endterm="sql-altertstemplate-title"></member> |
||||
<member><xref linkend="sql-droptstemplate" endterm="sql-droptstemplate-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
</refentry> |
||||
@ -0,0 +1,118 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tsconfig.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-DROPTSCONFIG"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-DROPTSCONFIG-TITLE">DROP TEXT SEARCH CONFIGURATION</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>DROP TEXT SEARCH CONFIGURATION</refname> |
||||
<refpurpose>remove a text search configuration</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-droptsconfig"> |
||||
<primary>DROP TEXT SEARCH CONFIGURATION</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
DROP TEXT SEARCH CONFIGURATION [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ] |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>DROP TEXT SEARCH CONFIGURATION</command> drops an existing text |
||||
search configuration. To execute this command you must be the owner of the |
||||
configuration. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
|
||||
<varlistentry> |
||||
<term><literal>IF EXISTS</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Do not throw an error if the text search configuration does not exist. |
||||
A notice is issued in this case. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search |
||||
configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>CASCADE</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Automatically drop objects that depend on the text search configuration. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>RESTRICT</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Refuse to drop the text search configuration if any objects depend on it. |
||||
This is the default. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Examples</title> |
||||
|
||||
<para> |
||||
Remove the text search configuration <literal>my_english</literal>: |
||||
|
||||
<programlisting> |
||||
DROP TEXT SEARCH CONFIGURATION my_english; |
||||
</programlisting> |
||||
|
||||
This command will not succeed if there are any existing indexes |
||||
that reference the configuration in <function>to_tsvector</> calls. |
||||
Add <literal>CASCADE</> to |
||||
drop such indexes along with the text search configuration. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>DROP TEXT SEARCH CONFIGURATION</command> statement in |
||||
the SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertsconfig" endterm="sql-altertsconfig-title"></member> |
||||
<member><xref linkend="sql-createtsconfig" endterm="sql-createtsconfig-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
|
||||
</refentry> |
||||
@ -0,0 +1,117 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tsdictionary.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-DROPTSDICTIONARY"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-DROPTSDICTIONARY-TITLE">DROP TEXT SEARCH DICTIONARY</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>DROP TEXT SEARCH DICTIONARY</refname> |
||||
<refpurpose>remove a text search dictionary</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-droptsdictionary"> |
||||
<primary>DROP TEXT SEARCH DICTIONARY</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
DROP TEXT SEARCH DICTIONARY [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ] |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>DROP TEXT SEARCH DICTIONARY</command> drops an existing text |
||||
search dictionary. To execute this command you must be the owner of the |
||||
dictionary. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
|
||||
<varlistentry> |
||||
<term><literal>IF EXISTS</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Do not throw an error if the text search dictionary does not exist. |
||||
A notice is issued in this case. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search |
||||
dictionary. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>CASCADE</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Automatically drop objects that depend on the text search dictionary. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>RESTRICT</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Refuse to drop the text search dictionary if any objects depend on it. |
||||
This is the default. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Examples</title> |
||||
|
||||
<para> |
||||
Remove the text search dictionary <literal>english</literal>: |
||||
|
||||
<programlisting> |
||||
DROP TEXT SEARCH DICTIONARY english; |
||||
</programlisting> |
||||
|
||||
This command will not succeed if there are any existing text search |
||||
configurations that use the dictionary. Add <literal>CASCADE</> to |
||||
drop such configurations along with the dictionary. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>DROP TEXT SEARCH DICTIONARY</command> statement in the |
||||
SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertsdictionary" endterm="sql-altertsdictionary-title"></member> |
||||
<member><xref linkend="sql-createtsdictionary" endterm="sql-createtsdictionary-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
|
||||
</refentry> |
||||
@ -0,0 +1,115 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tsparser.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-DROPTSPARSER"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-DROPTSPARSER-TITLE">DROP TEXT SEARCH PARSER</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>DROP TEXT SEARCH PARSER</refname> |
||||
<refpurpose>remove a text search parser</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-droptsparser"> |
||||
<primary>DROP TEXT SEARCH PARSER</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
DROP TEXT SEARCH PARSER [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ] |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>DROP TEXT SEARCH PARSER</command> drops an existing text search |
||||
parser. You must be a superuser to use this command. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
|
||||
<varlistentry> |
||||
<term><literal>IF EXISTS</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Do not throw an error if the text search parser does not exist. |
||||
A notice is issued in this case. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>CASCADE</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Automatically drop objects that depend on the text search parser. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>RESTRICT</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Refuse to drop the text search parser if any objects depend on it. |
||||
This is the default. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Examples</title> |
||||
|
||||
<para> |
||||
Remove the text search parser <literal>my_parser</literal>: |
||||
|
||||
<programlisting> |
||||
DROP TEXT SEARCH PARSER my_parser; |
||||
</programlisting> |
||||
|
||||
This command will not succeed if there are any existing text search |
||||
configurations that use the parser. Add <literal>CASCADE</> to |
||||
drop such configurations along with the parser. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>DROP TEXT SEARCH PARSER</command> statement in the |
||||
SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertsparser" endterm="sql-altertsparser-title"></member> |
||||
<member><xref linkend="sql-createtsparser" endterm="sql-createtsparser-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
|
||||
</refentry> |
||||
@ -0,0 +1,116 @@ |
||||
<!-- |
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tstemplate.sgml,v 1.1 2007/08/21 21:08:47 tgl Exp $ |
||||
PostgreSQL documentation |
||||
--> |
||||
|
||||
<refentry id="SQL-DROPTSTEMPLATE"> |
||||
<refmeta> |
||||
<refentrytitle id="SQL-DROPTSTEMPLATE-TITLE">DROP TEXT SEARCH TEMPLATE</refentrytitle> |
||||
<refmiscinfo>SQL - Language Statements</refmiscinfo> |
||||
</refmeta> |
||||
|
||||
<refnamediv> |
||||
<refname>DROP TEXT SEARCH TEMPLATE</refname> |
||||
<refpurpose>remove a text search template</refpurpose> |
||||
</refnamediv> |
||||
|
||||
<indexterm zone="sql-droptstemplate"> |
||||
<primary>DROP TEXT SEARCH TEMPLATE</primary> |
||||
</indexterm> |
||||
|
||||
<refsynopsisdiv> |
||||
<synopsis> |
||||
DROP TEXT SEARCH TEMPLATE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ] |
||||
</synopsis> |
||||
</refsynopsisdiv> |
||||
|
||||
<refsect1> |
||||
<title>Description</title> |
||||
|
||||
<para> |
||||
<command>DROP TEXT SEARCH TEMPLATE</command> drops an existing text search |
||||
template. You must be a superuser to use this command. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Parameters</title> |
||||
|
||||
<variablelist> |
||||
|
||||
<varlistentry> |
||||
<term><literal>IF EXISTS</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Do not throw an error if the text search template does not exist. |
||||
A notice is issued in this case. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><replaceable class="parameter">name</replaceable></term> |
||||
<listitem> |
||||
<para> |
||||
The name (optionally schema-qualified) of an existing text search |
||||
template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>CASCADE</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Automatically drop objects that depend on the text search template. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><literal>RESTRICT</literal></term> |
||||
<listitem> |
||||
<para> |
||||
Refuse to drop the text search template if any objects depend on it. |
||||
This is the default. |
||||
</para> |
||||
</listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Examples</title> |
||||
|
||||
<para> |
||||
Remove the text search template <literal>thesaurus</literal>: |
||||
|
||||
<programlisting> |
||||
DROP TEXT SEARCH TEMPLATE thesaurus; |
||||
</programlisting> |
||||
|
||||
This command will not succeed if there are any existing text search |
||||
dictionaries that use the template. Add <literal>CASCADE</> to |
||||
drop such dictionaries along with the template. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>Compatibility</title> |
||||
|
||||
<para> |
||||
There is no <command>DROP TEXT SEARCH TEMPLATE</command> statement in the |
||||
SQL standard. |
||||
</para> |
||||
</refsect1> |
||||
|
||||
<refsect1> |
||||
<title>See Also</title> |
||||
|
||||
<simplelist type="inline"> |
||||
<member><xref linkend="sql-altertstemplate" endterm="sql-altertstemplate-title"></member> |
||||
<member><xref linkend="sql-createtstemplate" endterm="sql-createtstemplate-title"></member> |
||||
</simplelist> |
||||
</refsect1> |
||||
|
||||
</refentry> |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue