Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/ref/create_tsparser.sgml`
50768a64044367d4a4684ebc1a9075fbd375903ec6e91a2b000000010000086e
<!--
doc/src/sgml/ref/create_tsparser.sgml
PostgreSQL documentation
-->

<refentry id="sql-createtsparser">
 <indexterm zone="sql-createtsparser">
  <primary>CREATE TEXT SEARCH PARSER</primary>
 </indexterm>

 <refmeta>
  <refentrytitle>CREATE TEXT SEARCH PARSER</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>CREATE TEXT SEARCH PARSER</refname>
  <refpurpose>define a new text search parser</refpurpose>
 </refnamediv>

 <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

Title: CREATE TEXT SEARCH PARSER
Summary
This section of the PostgreSQL documentation describes the CREATE TEXT SEARCH PARSER command, which defines a new text search parser. A text search parser defines a method for splitting a text string into tokens and assigning types to those tokens. The command requires superuser privileges. The documentation outlines the basic syntax and refers to the textsearch documentation for further details.