]> begriffs open source - ai-pg/blob - full-docs/src/sgml/html/textsearch-psql.html
PG 18 docs from https://ftp.postgresql.org/pub/source/v18.0/postgresql-18.0-docs...
[ai-pg] / full-docs / src / sgml / html / textsearch-psql.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>12.10. psql Support</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="textsearch-indexes.html" title="12.9. Preferred Index Types for Text Search" /><link rel="next" href="textsearch-limitations.html" title="12.11. Limitations" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">12.10. <span class="application">psql</span> Support</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="textsearch-indexes.html" title="12.9. Preferred Index Types for Text Search">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="textsearch.html" title="Chapter 12. Full Text Search">Up</a></td><th width="60%" align="center">Chapter 12. Full Text Search</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="textsearch-limitations.html" title="12.11. Limitations">Next</a></td></tr></table><hr /></div><div class="sect1" id="TEXTSEARCH-PSQL"><div class="titlepage"><div><div><h2 class="title" style="clear: both">12.10. <span class="application">psql</span> Support <a href="#TEXTSEARCH-PSQL" class="id_link">#</a></h2></div></div></div><p>
3    Information about text search configuration objects can be obtained
4    in <span class="application">psql</span> using a set of commands:
5 </p><pre class="synopsis">
6 \dF{d,p,t}[<span class="optional">+</span>] [<span class="optional">PATTERN</span>]
7 </pre><p>
8    An optional <code class="literal">+</code> produces more details.
9   </p><p>
10    The optional parameter <em class="replaceable"><code>PATTERN</code></em> can be the name of
11    a text search object, optionally schema-qualified.  If
12    <em class="replaceable"><code>PATTERN</code></em> is omitted then information about all
13    visible objects will be displayed.  <em class="replaceable"><code>PATTERN</code></em> can be a
14    regular expression and can provide <span class="emphasis"><em>separate</em></span> patterns
15    for the schema and object names.  The following examples illustrate this:
16
17 </p><pre class="screen">
18 =&gt; \dF *fulltext*
19        List of text search configurations
20  Schema |  Name        | Description
21 --------+--------------+-------------
22  public | fulltext_cfg |
23 </pre><p>
24
25 </p><pre class="screen">
26 =&gt; \dF *.fulltext*
27        List of text search configurations
28  Schema   |  Name        | Description
29 ----------+----------------------------
30  fulltext | fulltext_cfg |
31  public   | fulltext_cfg |
32 </pre><p>
33
34    The available commands are:
35   </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">\dF[<span class="optional">+</span>] [<span class="optional">PATTERN</span>]</code></span></dt><dd><p>
36       List text search configurations (add <code class="literal">+</code> for more detail).
37 </p><pre class="screen">
38 =&gt; \dF russian
39             List of text search configurations
40    Schema   |  Name   |            Description
41 ------------+---------+------------------------------------
42  pg_catalog | russian | configuration for russian language
43
44 =&gt; \dF+ russian
45 Text search configuration "pg_catalog.russian"
46 Parser: "pg_catalog.default"
47       Token      | Dictionaries
48 -----------------+--------------
49  asciihword      | english_stem
50  asciiword       | english_stem
51  email           | simple
52  file            | simple
53  float           | simple
54  host            | simple
55  hword           | russian_stem
56  hword_asciipart | english_stem
57  hword_numpart   | simple
58  hword_part      | russian_stem
59  int             | simple
60  numhword        | simple
61  numword         | simple
62  sfloat          | simple
63  uint            | simple
64  url             | simple
65  url_path        | simple
66  version         | simple
67  word            | russian_stem
68 </pre><p>
69      </p></dd><dt><span class="term"><code class="literal">\dFd[<span class="optional">+</span>] [<span class="optional">PATTERN</span>]</code></span></dt><dd><p>
70       List text search dictionaries (add <code class="literal">+</code> for more detail).
71 </p><pre class="screen">
72 =&gt; \dFd
73                              List of text search dictionaries
74    Schema   |      Name       |                        Description
75 ------------+-----------------+-----------------------------------------------------------
76  pg_catalog | arabic_stem     | snowball stemmer for arabic language
77  pg_catalog | armenian_stem   | snowball stemmer for armenian language
78  pg_catalog | basque_stem     | snowball stemmer for basque language
79  pg_catalog | catalan_stem    | snowball stemmer for catalan language
80  pg_catalog | danish_stem     | snowball stemmer for danish language
81  pg_catalog | dutch_stem      | snowball stemmer for dutch language
82  pg_catalog | english_stem    | snowball stemmer for english language
83  pg_catalog | estonian_stem   | snowball stemmer for estonian language
84  pg_catalog | finnish_stem    | snowball stemmer for finnish language
85  pg_catalog | french_stem     | snowball stemmer for french language
86  pg_catalog | german_stem     | snowball stemmer for german language
87  pg_catalog | greek_stem      | snowball stemmer for greek language
88  pg_catalog | hindi_stem      | snowball stemmer for hindi language
89  pg_catalog | hungarian_stem  | snowball stemmer for hungarian language
90  pg_catalog | indonesian_stem | snowball stemmer for indonesian language
91  pg_catalog | irish_stem      | snowball stemmer for irish language
92  pg_catalog | italian_stem    | snowball stemmer for italian language
93  pg_catalog | lithuanian_stem | snowball stemmer for lithuanian language
94  pg_catalog | nepali_stem     | snowball stemmer for nepali language
95  pg_catalog | norwegian_stem  | snowball stemmer for norwegian language
96  pg_catalog | portuguese_stem | snowball stemmer for portuguese language
97  pg_catalog | romanian_stem   | snowball stemmer for romanian language
98  pg_catalog | russian_stem    | snowball stemmer for russian language
99  pg_catalog | serbian_stem    | snowball stemmer for serbian language
100  pg_catalog | simple          | simple dictionary: just lower case and check for stopword
101  pg_catalog | spanish_stem    | snowball stemmer for spanish language
102  pg_catalog | swedish_stem    | snowball stemmer for swedish language
103  pg_catalog | tamil_stem      | snowball stemmer for tamil language
104  pg_catalog | turkish_stem    | snowball stemmer for turkish language
105  pg_catalog | yiddish_stem    | snowball stemmer for yiddish language
106 </pre><p>
107      </p></dd><dt><span class="term"><code class="literal">\dFp[<span class="optional">+</span>] [<span class="optional">PATTERN</span>]</code></span></dt><dd><p>
108       List text search parsers (add <code class="literal">+</code> for more detail).
109 </p><pre class="screen">
110 =&gt; \dFp
111         List of text search parsers
112    Schema   |  Name   |     Description
113 ------------+---------+---------------------
114  pg_catalog | default | default word parser
115 =&gt; \dFp+
116     Text search parser "pg_catalog.default"
117      Method      |    Function    | Description
118 -----------------+----------------+-------------
119  Start parse     | prsd_start     |
120  Get next token  | prsd_nexttoken |
121  End parse       | prsd_end       |
122  Get headline    | prsd_headline  |
123  Get token types | prsd_lextype   |
124
125         Token types for parser "pg_catalog.default"
126    Token name    |               Description
127 -----------------+------------------------------------------
128  asciihword      | Hyphenated word, all ASCII
129  asciiword       | Word, all ASCII
130  blank           | Space symbols
131  email           | Email address
132  entity          | XML entity
133  file            | File or path name
134  float           | Decimal notation
135  host            | Host
136  hword           | Hyphenated word, all letters
137  hword_asciipart | Hyphenated word part, all ASCII
138  hword_numpart   | Hyphenated word part, letters and digits
139  hword_part      | Hyphenated word part, all letters
140  int             | Signed integer
141  numhword        | Hyphenated word, letters and digits
142  numword         | Word, letters and digits
143  protocol        | Protocol head
144  sfloat          | Scientific notation
145  tag             | XML tag
146  uint            | Unsigned integer
147  url             | URL
148  url_path        | URL path
149  version         | Version number
150  word            | Word, all letters
151 (23 rows)
152 </pre><p>
153      </p></dd><dt><span class="term"><code class="literal">\dFt[<span class="optional">+</span>] [<span class="optional">PATTERN</span>]</code></span></dt><dd><p>
154       List text search templates (add <code class="literal">+</code> for more detail).
155 </p><pre class="screen">
156 =&gt; \dFt
157                            List of text search templates
158    Schema   |   Name    |                        Description
159 ------------+-----------+-----------------------------------------------------------
160  pg_catalog | ispell    | ispell dictionary
161  pg_catalog | simple    | simple dictionary: just lower case and check for stopword
162  pg_catalog | snowball  | snowball stemmer
163  pg_catalog | synonym   | synonym dictionary: replace word by its synonym
164  pg_catalog | thesaurus | thesaurus dictionary: phrase by phrase substitution
165 </pre><p>
166      </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="textsearch-indexes.html" title="12.9. Preferred Index Types for Text Search">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="textsearch.html" title="Chapter 12. Full Text Search">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="textsearch-limitations.html" title="12.11. Limitations">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12.9. Preferred Index Types for Text Search </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 12.11. Limitations</td></tr></table></div></body></html>