Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2ae5d72

Browse files
committed
Doc: improve documentation for ^@ starts-with operator.
This operator wasn't formally documented anywhere. To give it a natural home, relabel the functions-string-other table as "Other String Functions and Operators", which is more parallel to the functions-string-sql table anyway. While here, add cross-references to the pattern match and text search sections. It seems moderately likely that people would come to this section looking for those (but I don't want to actually list them in these tables). Discussion: https://postgr.es/m/CADT4RqB13KQHOJqqQ+WXmYtJrukS2UiFdtfTvT-XA3qYLyB6Cw@mail.gmail.com
1 parent 8b76f89 commit 2ae5d72

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

doc/src/sgml/func.sgml

+33-8
Original file line numberDiff line numberDiff line change
@@ -2708,18 +2708,23 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
27082708
</table>
27092709

27102710
<para>
2711-
Additional string manipulation functions are available and are
2712-
listed in <xref linkend="functions-string-other"/>. Some of them are used internally to implement the
2713-
<acronym>SQL</acronym>-standard string functions listed in <xref linkend="functions-string-sql"/>.
2711+
Additional string manipulation functions and operators are available
2712+
and are listed in <xref linkend="functions-string-other"/>. (Some of
2713+
these are used internally to implement
2714+
the <acronym>SQL</acronym>-standard string functions listed in
2715+
<xref linkend="functions-string-sql"/>.)
2716+
There are also pattern-matching operators, which are described in
2717+
<xref linkend="functions-matching"/>, and operators for full-text
2718+
search, which are described in <xref linkend="textsearch"/>.
27142719
</para>
27152720

27162721
<table id="functions-string-other">
2717-
<title>Other String Functions</title>
2722+
<title>Other String Functions and Operators</title>
27182723
<tgroup cols="1">
27192724
<thead>
27202725
<row>
27212726
<entry role="func_table_entry"><para role="func_signature">
2722-
Function
2727+
Function/Operator
27232728
</para>
27242729
<para>
27252730
Description
@@ -2731,6 +2736,25 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
27312736
</thead>
27322737

27332738
<tbody>
2739+
<row>
2740+
<entry role="func_table_entry"><para role="func_signature">
2741+
<indexterm>
2742+
<primary>character string</primary>
2743+
<secondary>prefix test</secondary>
2744+
</indexterm>
2745+
<type>text</type> <literal>^@</literal> <type>text</type>
2746+
<returnvalue>boolean</returnvalue>
2747+
</para>
2748+
<para>
2749+
Returns true if the first string starts with the second string
2750+
(equivalent to the <function>starts_with()</function> function).
2751+
</para>
2752+
<para>
2753+
<literal>'alphabet' ^@ 'alph'</literal>
2754+
<returnvalue>t</returnvalue>
2755+
</para></entry>
2756+
</row>
2757+
27342758
<row>
27352759
<entry role="func_table_entry"><para role="func_signature">
27362760
<indexterm>
@@ -5285,9 +5309,10 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
52855309
</para>
52865310

52875311
<para>
5288-
Also see the prefix operator <literal>^@</literal> and corresponding
5289-
<function>starts_with</function> function, which are useful in cases
5290-
where simply matching the beginning of a string is needed.
5312+
Also see the starts-with operator <literal>^@</literal> and the
5313+
corresponding <function>starts_with()</function> function, which are
5314+
useful in cases where simply matching the beginning of a string is
5315+
needed.
52915316
</para>
52925317
</sect2>
52935318

0 commit comments

Comments
 (0)