Extracts specified substring. (same as <literal>substring(<parameter>string</parameter> from <parameter>from</parameter> for <parameter>count</parameter>)</literal>)
<firstterm><acronym>SQL</acronym> functions</firstterm> are constructs
defined by the <acronym>SQL92</acronym> standard which have
function-like syntax but which can not be implemented as simple
functions.
If you have pattern matching needs that go beyond this, or want to
make pattern-driven substitutions or translations, consider
writing a user-defined function in Perl or Tcl.
</para>
</tip>
<sect2 id="functions-like">
<title>Pattern Matching with <function>LIKE</function></title>
<synopsis>
<replaceable>string</replaceable> LIKE <replaceable>pattern</replaceable> <optional> ESCAPE <replaceable>escape-character</replaceable> </optional>
<replaceable>string</replaceable> NOT LIKE <replaceable>pattern</replaceable> <optional> ESCAPE <replaceable>escape-character</replaceable> </optional>
<entry>Same as the data type of the input expression.</entry>
<entry>The maximum value of <replaceable class="parameter">expression</replaceable> across all selected rows.</entry>
<entry>MAX(age)</entry>
<entry>Finding the maximum value is supported on the following data types: int8, int4, int2, float4, float8, date, time, timetz, money, timestamp, interval, text, numeric.</entry>
<entry>Same as the data type of the input expression.</entry>
<entry>The minimum value of <replaceable class="parameter">expression</replaceable> across all selected rows.</entry>
<entry>MIN(age)</entry>
<entry>Finding the minimum value is supported on the following data types: int8, int4, int2, float4, float8, date, time, timetz, money, timestamp, interval, text, numeric.</entry>
</row>
<para>
<firstterm>Aggregate functions</firstterm> compute a single result
value from a set of input values. The special syntax
considerations for aggregate functions are explained in <xref
linkend="syntax-aggregates">. Consult the <citetitle>PostgreSQL
Tutorial</citetitle> for additional introductory information.