-<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.488 2009/10/09 21:02:55 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.489 2009/10/10 03:50:15 tgl Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
or more times.
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>?</literal> denotes repetition of the previous item zero
+ or one time.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>{</><replaceable>m</><literal>}</literal> denotes repetition
+ of the previous item exactly <replaceable>m</> times.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>{</><replaceable>m</><literal>,}</literal> denotes repetition
+ of the previous item <replaceable>m</> or more times.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}</>
+ denotes repetition of the previous item at least <replaceable>m</> and
+ not more than <replaceable>n</> times.
+ </para>
+ </listitem>
<listitem>
<para>
Parentheses <literal>()</literal> can be used to group items into
</listitem>
</itemizedlist>
- Notice that bounded repetition operators (<literal>?</> and
- <literal>{...}</>) are not provided, though they exist in POSIX.
- Also, the period (<literal>.</>) is not a metacharacter.
+ Notice that the period (<literal>.</>) is not a metacharacter
+ for <function>SIMILAR TO</>.
</para>
<para>
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.82 2009/06/11 14:49:04 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.83 2009/10/10 03:50:15 tgl Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
/*
* similar_escape()
- * Convert a SQL99 regexp pattern to POSIX style, so it can be used by
+ * Convert a SQL:2008 regexp pattern to POSIX style, so it can be used by
* our regexp engine.
*/
Datum
}
else if (pchar == '_')
*r++ = '.';
- else if (pchar == '\\' || pchar == '.' || pchar == '?' ||
- pchar == '{')
+ else if (pchar == '\\' || pchar == '.' ||
+ pchar == '^' || pchar == '$')
{
*r++ = '\\';
*r++ = pchar;