mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	First rough cut at text search documentation: bare bones reference
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.
This commit is contained in:
		
							parent
							
								
									5c681ab1cb
								
							
						
					
					
						commit
						3e3bb36ee9
					
				| @ -1,4 +1,4 @@ | ||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.49 2006/11/17 16:38:44 momjian Exp $ --> | ||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.50 2007/08/21 21:08:47 tgl Exp $ --> | ||||
| 
 | ||||
| <!entity history    SYSTEM "history.sgml"> | ||||
| <!entity info       SYSTEM "info.sgml"> | ||||
| @ -17,7 +17,6 @@ | ||||
| 
 | ||||
| <!-- user's guide --> | ||||
| <!entity array      SYSTEM "array.sgml"> | ||||
| <!entity rowtypes   SYSTEM "rowtypes.sgml"> | ||||
| <!entity datatype   SYSTEM "datatype.sgml"> | ||||
| <!entity ddl        SYSTEM "ddl.sgml"> | ||||
| <!entity dml        SYSTEM "dml.sgml"> | ||||
| @ -26,7 +25,9 @@ | ||||
| <!entity mvcc       SYSTEM "mvcc.sgml"> | ||||
| <!entity perform    SYSTEM "perform.sgml"> | ||||
| <!entity queries    SYSTEM "queries.sgml"> | ||||
| <!entity rowtypes   SYSTEM "rowtypes.sgml"> | ||||
| <!entity syntax     SYSTEM "syntax.sgml"> | ||||
| <!entity textsearch SYSTEM "textsearch.sgml"> | ||||
| <!entity typeconv   SYSTEM "typeconv.sgml"> | ||||
| 
 | ||||
| <!-- administrator's guide --> | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/postgres.sgml,v 1.81 2007/01/31 20:56:18 momjian Exp $ --> | ||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/postgres.sgml,v 1.82 2007/08/21 21:08:47 tgl Exp $ --> | ||||
| 
 | ||||
| <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [ | ||||
| 
 | ||||
| @ -101,6 +101,7 @@ | ||||
|   &func; | ||||
|   &typeconv; | ||||
|   &indices; | ||||
|   &textsearch; | ||||
|   &mvcc; | ||||
|   &perform; | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!-- | ||||
| $PostgreSQL: pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.71 2007/07/03 01:30:35 neilc Exp $ | ||||
| $PostgreSQL: pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.72 2007/08/21 21:08:47 tgl Exp $ | ||||
| PostgreSQL documentation | ||||
| Complete list of usable sgml source files in this directory. | ||||
| --> | ||||
| @ -22,6 +22,10 @@ Complete list of usable sgml source files in this directory. | ||||
| <!entity alterSequence      system "alter_sequence.sgml"> | ||||
| <!entity alterTable         system "alter_table.sgml"> | ||||
| <!entity alterTableSpace    system "alter_tablespace.sgml"> | ||||
| <!entity alterTSConfig      system "alter_tsconfig.sgml"> | ||||
| <!entity alterTSDictionary  system "alter_tsdictionary.sgml"> | ||||
| <!entity alterTSParser      system "alter_tsparser.sgml"> | ||||
| <!entity alterTSTemplate    system "alter_tstemplate.sgml"> | ||||
| <!entity alterTrigger       system "alter_trigger.sgml"> | ||||
| <!entity alterType          system "alter_type.sgml"> | ||||
| <!entity alterUser          system "alter_user.sgml"> | ||||
| @ -56,6 +60,10 @@ Complete list of usable sgml source files in this directory. | ||||
| <!entity createTableAs      system "create_table_as.sgml"> | ||||
| <!entity createTableSpace   system "create_tablespace.sgml"> | ||||
| <!entity createTrigger      system "create_trigger.sgml"> | ||||
| <!entity createTSConfig     system "create_tsconfig.sgml"> | ||||
| <!entity createTSDictionary system "create_tsdictionary.sgml"> | ||||
| <!entity createTSParser     system "create_tsparser.sgml"> | ||||
| <!entity createTSTemplate   system "create_tstemplate.sgml"> | ||||
| <!entity createType         system "create_type.sgml"> | ||||
| <!entity createUser         system "create_user.sgml"> | ||||
| <!entity createView         system "create_view.sgml"> | ||||
| @ -83,6 +91,10 @@ Complete list of usable sgml source files in this directory. | ||||
| <!entity dropTable          system "drop_table.sgml"> | ||||
| <!entity dropTableSpace     system "drop_tablespace.sgml"> | ||||
| <!entity dropTrigger        system "drop_trigger.sgml"> | ||||
| <!entity dropTSConfig       system "drop_tsconfig.sgml"> | ||||
| <!entity dropTSDictionary   system "drop_tsdictionary.sgml"> | ||||
| <!entity dropTSParser       system "drop_tsparser.sgml"> | ||||
| <!entity dropTSTemplate     system "drop_tstemplate.sgml"> | ||||
| <!entity dropType           system "drop_type.sgml"> | ||||
| <!entity dropUser           system "drop_user.sgml"> | ||||
| <!entity dropView           system "drop_view.sgml"> | ||||
|  | ||||
							
								
								
									
										202
									
								
								doc/src/sgml/ref/alter_tsconfig.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										202
									
								
								doc/src/sgml/ref/alter_tsconfig.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										118
									
								
								doc/src/sgml/ref/alter_tsdictionary.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								doc/src/sgml/ref/alter_tsdictionary.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										82
									
								
								doc/src/sgml/ref/alter_tsparser.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								doc/src/sgml/ref/alter_tsparser.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										82
									
								
								doc/src/sgml/ref/alter_tstemplate.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								doc/src/sgml/ref/alter_tstemplate.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
| @ -1,5 +1,5 @@ | ||||
| <!-- | ||||
| $PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.35 2007/01/31 23:26:03 momjian Exp $ | ||||
| $PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.36 2007/08/21 21:08:47 tgl Exp $ | ||||
| PostgreSQL documentation | ||||
| --> | ||||
| 
 | ||||
| @ -42,6 +42,10 @@ COMMENT ON | ||||
|   SCHEMA <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   SEQUENCE <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   TABLESPACE <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   TEXT SEARCH CONFIGURATION <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   TEXT SEARCH DICTIONARY <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   TEXT SEARCH PARSER <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   TEXT SEARCH TEMPLATE <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   TRIGGER <replaceable class="PARAMETER">trigger_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> | | ||||
|   TYPE <replaceable class="PARAMETER">object_name</replaceable> | | ||||
|   VIEW <replaceable class="PARAMETER">object_name</replaceable> | ||||
| @ -65,9 +69,8 @@ COMMENT ON | ||||
|   </para> | ||||
| 
 | ||||
|   <para> | ||||
|     Comments can be | ||||
|     easily retrieved with the <application>psql</application> commands | ||||
|     <command>\dd</command>, <command>\d+</command>, and <command>\l+</command>. | ||||
|     Comments can be viewed using <application>psql</application>'s  | ||||
|     <command>\d</command> family of commands. | ||||
|     Other user interfaces to retrieve comments can be built atop | ||||
|     the same built-in functions that <application>psql</application> uses, namely | ||||
|     <function>obj_description</>, <function>col_description</>, | ||||
| @ -93,7 +96,8 @@ COMMENT ON | ||||
|      <para> | ||||
|       The name of the object to be commented.  Names of tables, | ||||
|       aggregates, domains, functions, indexes, operators, operator classes, | ||||
|       operator families, sequences, types, and views can be schema-qualified. | ||||
|       operator families, sequences, text search objects, types, and views can | ||||
|       be schema-qualified. | ||||
|      </para> | ||||
|     </listitem> | ||||
|    </varlistentry> | ||||
| @ -255,6 +259,10 @@ COMMENT ON SCHEMA my_schema IS 'Departmental data'; | ||||
| COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys'; | ||||
| COMMENT ON TABLE my_schema.my_table IS 'Employee Information'; | ||||
| COMMENT ON TABLESPACE my_tablespace IS 'Tablespace for indexes'; | ||||
| COMMENT ON TEXT SEARCH CONFIGURATION my_config IS 'Special word filtering'; | ||||
| COMMENT ON TEXT SEARCH DICTIONARY swedish IS 'Snowball stemmer for swedish language'; | ||||
| COMMENT ON TEXT SEARCH PARSER my_parser IS 'Splits text into words'; | ||||
| COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'Snowball stemmer'; | ||||
| COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for RI'; | ||||
| COMMENT ON TYPE complex IS 'Complex number data type'; | ||||
| COMMENT ON VIEW my_view IS 'View of departmental costs'; | ||||
|  | ||||
							
								
								
									
										126
									
								
								doc/src/sgml/ref/create_tsconfig.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								doc/src/sgml/ref/create_tsconfig.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										111
									
								
								doc/src/sgml/ref/create_tsdictionary.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								doc/src/sgml/ref/create_tsdictionary.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										152
									
								
								doc/src/sgml/ref/create_tsparser.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										152
									
								
								doc/src/sgml/ref/create_tsparser.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										125
									
								
								doc/src/sgml/ref/create_tstemplate.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								doc/src/sgml/ref/create_tstemplate.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										118
									
								
								doc/src/sgml/ref/drop_tsconfig.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								doc/src/sgml/ref/drop_tsconfig.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										117
									
								
								doc/src/sgml/ref/drop_tsdictionary.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										117
									
								
								doc/src/sgml/ref/drop_tsdictionary.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										115
									
								
								doc/src/sgml/ref/drop_tsparser.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										115
									
								
								doc/src/sgml/ref/drop_tsparser.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										116
									
								
								doc/src/sgml/ref/drop_tstemplate.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										116
									
								
								doc/src/sgml/ref/drop_tstemplate.sgml
									
									
									
									
									
										Normal file
									
								
							| @ -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> | ||||
| @ -1,4 +1,4 @@ | ||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/reference.sgml,v 1.64 2007/07/03 01:30:35 neilc Exp $ --> | ||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/reference.sgml,v 1.65 2007/08/21 21:08:47 tgl Exp $ --> | ||||
| 
 | ||||
| <part id="reference"> | ||||
|  <title>Reference</title> | ||||
| @ -50,6 +50,10 @@ | ||||
|    &alterSequence; | ||||
|    &alterTable; | ||||
|    &alterTableSpace; | ||||
|    &alterTSConfig; | ||||
|    &alterTSDictionary; | ||||
|    &alterTSParser; | ||||
|    &alterTSTemplate; | ||||
|    &alterTrigger; | ||||
|    &alterType; | ||||
|    &alterUser; | ||||
| @ -83,6 +87,10 @@ | ||||
|    &createTable; | ||||
|    &createTableAs; | ||||
|    &createTableSpace; | ||||
|    &createTSConfig; | ||||
|    &createTSDictionary; | ||||
|    &createTSParser; | ||||
|    &createTSTemplate; | ||||
|    &createTrigger; | ||||
|    &createType; | ||||
|    &createUser; | ||||
| @ -110,6 +118,10 @@ | ||||
|    &dropSequence; | ||||
|    &dropTable; | ||||
|    &dropTableSpace; | ||||
|    &dropTSConfig; | ||||
|    &dropTSDictionary; | ||||
|    &dropTSParser; | ||||
|    &dropTSTemplate; | ||||
|    &dropTrigger; | ||||
|    &dropType; | ||||
|    &dropUser; | ||||
|  | ||||
							
								
								
									
										3716
									
								
								doc/src/sgml/textsearch.sgml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3716
									
								
								doc/src/sgml/textsearch.sgml
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user