Submit
Path:
~
/
/
opt
/
alt
/
postgresql11
/
usr
/
share
/
doc
/
alt-postgresql11-9.2.24
/
html
/
File Content:
functions-matching.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Pattern Matching</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 9.2.24 Documentation" HREF="index.html"><LINK REL="UP" TITLE="Functions and Operators" HREF="functions.html"><LINK REL="PREVIOUS" TITLE="Bit String Functions and Operators" HREF="functions-bitstring.html"><LINK REL="NEXT" TITLE="Data Type Formatting Functions" HREF="functions-formatting.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><META NAME="creation" CONTENT="2017-11-06T22:43:11"></HEAD ><BODY CLASS="SECT1" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="5" ALIGN="center" VALIGN="bottom" ><A HREF="index.html" >PostgreSQL 9.2.24 Documentation</A ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A TITLE="Bit String Functions and Operators" HREF="functions-bitstring.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="functions.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="60%" ALIGN="center" VALIGN="bottom" >Chapter 9. Functions and Operators</TD ><TD WIDTH="20%" ALIGN="right" VALIGN="top" ><A TITLE="Data Type Formatting Functions" HREF="functions-formatting.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="FUNCTIONS-MATCHING" >9.7. Pattern Matching</A ></H1 ><P > There are three separate approaches to pattern matching provided by <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >: the traditional <ACRONYM CLASS="ACRONYM" >SQL</ACRONYM > <CODE CLASS="FUNCTION" >LIKE</CODE > operator, the more recent <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > operator (added in SQL:1999), and <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM >-style regular expressions. Aside from the basic <SPAN CLASS="QUOTE" >"does this string match this pattern?"</SPAN > operators, functions are available to extract or replace matching substrings and to split a string at matching locations. </P ><DIV CLASS="TIP" ><BLOCKQUOTE CLASS="TIP" ><P ><B >Tip: </B > If you have pattern matching needs that go beyond this, consider writing a user-defined function in Perl or Tcl. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="CAUTION" ><P ></P ><TABLE CLASS="CAUTION" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Caution</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P > While most regular-expression searches can be executed very quickly, regular expressions can be contrived that take arbitrary amounts of time and memory to process. Be wary of accepting regular-expression search patterns from hostile sources. If you must do so, it is advisable to impose a statement timeout. </P ><P > Searches using <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > patterns have the same security hazards, since <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > provides many of the same capabilities as <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM >-style regular expressions. </P ><P > <CODE CLASS="FUNCTION" >LIKE</CODE > searches, being much simpler than the other two options, are safer to use with possibly-hostile pattern sources. </P ></TD ></TR ></TABLE ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="FUNCTIONS-LIKE" >9.7.1. <CODE CLASS="FUNCTION" >LIKE</CODE ></A ></H2 ><PRE CLASS="SYNOPSIS" ><TT CLASS="REPLACEABLE" ><I >string</I ></TT > LIKE <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >ESCAPE <TT CLASS="REPLACEABLE" ><I >escape-character</I ></TT ></SPAN >] <TT CLASS="REPLACEABLE" ><I >string</I ></TT > NOT LIKE <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >ESCAPE <TT CLASS="REPLACEABLE" ><I >escape-character</I ></TT ></SPAN >]</PRE ><P > The <CODE CLASS="FUNCTION" >LIKE</CODE > expression returns true if the <TT CLASS="REPLACEABLE" ><I >string</I ></TT > matches the supplied <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT >. (As expected, the <CODE CLASS="FUNCTION" >NOT LIKE</CODE > expression returns false if <CODE CLASS="FUNCTION" >LIKE</CODE > returns true, and vice versa. An equivalent expression is <TT CLASS="LITERAL" >NOT (<TT CLASS="REPLACEABLE" ><I >string</I ></TT > LIKE <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT >)</TT >.) </P ><P > If <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > does not contain percent signs or underscores, then the pattern only represents the string itself; in that case <CODE CLASS="FUNCTION" >LIKE</CODE > acts like the equals operator. An underscore (<TT CLASS="LITERAL" >_</TT >) in <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > stands for (matches) any single character; a percent sign (<TT CLASS="LITERAL" >%</TT >) matches any sequence of zero or more characters. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" >'abc' LIKE 'abc' <I CLASS="LINEANNOTATION" >true</I > 'abc' LIKE 'a%' <I CLASS="LINEANNOTATION" >true</I > 'abc' LIKE '_b_' <I CLASS="LINEANNOTATION" >true</I > 'abc' LIKE 'c' <I CLASS="LINEANNOTATION" >false</I ></PRE ><P> </P ><P > <CODE CLASS="FUNCTION" >LIKE</CODE > pattern matching always covers the entire string. Therefore, if it's desired to match a sequence anywhere within a string, the pattern must start and end with a percent sign. </P ><P > To match a literal underscore or percent sign without matching other characters, the respective character in <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > must be preceded by the escape character. The default escape character is the backslash but a different one can be selected by using the <TT CLASS="LITERAL" >ESCAPE</TT > clause. To match the escape character itself, write two escape characters. </P ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > If you have <A HREF="runtime-config-compatible.html#GUC-STANDARD-CONFORMING-STRINGS" >standard_conforming_strings</A > turned off, any backslashes you write in literal string constants will need to be doubled. See <A HREF="sql-syntax-lexical.html#SQL-SYNTAX-STRINGS" >Section 4.1.2.1</A > for more information. </P ></BLOCKQUOTE ></DIV ><P > It's also possible to select no escape character by writing <TT CLASS="LITERAL" >ESCAPE ''</TT >. This effectively disables the escape mechanism, which makes it impossible to turn off the special meaning of underscore and percent signs in the pattern. </P ><P > The key word <TT CLASS="TOKEN" >ILIKE</TT > can be used instead of <TT CLASS="TOKEN" >LIKE</TT > to make the match case-insensitive according to the active locale. This is not in the <ACRONYM CLASS="ACRONYM" >SQL</ACRONYM > standard but is a <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > extension. </P ><P > The operator <TT CLASS="LITERAL" >~~</TT > is equivalent to <CODE CLASS="FUNCTION" >LIKE</CODE >, and <TT CLASS="LITERAL" >~~*</TT > corresponds to <CODE CLASS="FUNCTION" >ILIKE</CODE >. There are also <TT CLASS="LITERAL" >!~~</TT > and <TT CLASS="LITERAL" >!~~*</TT > operators that represent <CODE CLASS="FUNCTION" >NOT LIKE</CODE > and <CODE CLASS="FUNCTION" >NOT ILIKE</CODE >, respectively. All of these operators are <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >-specific. </P ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="FUNCTIONS-SIMILARTO-REGEXP" >9.7.2. <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > Regular Expressions</A ></H2 ><PRE CLASS="SYNOPSIS" ><TT CLASS="REPLACEABLE" ><I >string</I ></TT > SIMILAR TO <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >ESCAPE <TT CLASS="REPLACEABLE" ><I >escape-character</I ></TT ></SPAN >] <TT CLASS="REPLACEABLE" ><I >string</I ></TT > NOT SIMILAR TO <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >ESCAPE <TT CLASS="REPLACEABLE" ><I >escape-character</I ></TT ></SPAN >]</PRE ><P > The <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > operator returns true or false depending on whether its pattern matches the given string. It is similar to <CODE CLASS="FUNCTION" >LIKE</CODE >, except that it interprets the pattern using the SQL standard's definition of a regular expression. SQL regular expressions are a curious cross between <CODE CLASS="FUNCTION" >LIKE</CODE > notation and common regular expression notation. </P ><P > Like <CODE CLASS="FUNCTION" >LIKE</CODE >, the <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > operator succeeds only if its pattern matches the entire string; this is unlike common regular expression behavior where the pattern can match any part of the string. Also like <CODE CLASS="FUNCTION" >LIKE</CODE >, <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > uses <TT CLASS="LITERAL" >_</TT > and <TT CLASS="LITERAL" >%</TT > as wildcard characters denoting any single character and any string, respectively (these are comparable to <TT CLASS="LITERAL" >.</TT > and <TT CLASS="LITERAL" >.*</TT > in POSIX regular expressions). </P ><P > In addition to these facilities borrowed from <CODE CLASS="FUNCTION" >LIKE</CODE >, <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > supports these pattern-matching metacharacters borrowed from POSIX regular expressions: <P ></P ></P><UL ><LI ><P > <TT CLASS="LITERAL" >|</TT > denotes alternation (either of two alternatives). </P ></LI ><LI ><P > <TT CLASS="LITERAL" >*</TT > denotes repetition of the previous item zero or more times. </P ></LI ><LI ><P > <TT CLASS="LITERAL" >+</TT > denotes repetition of the previous item one or more times. </P ></LI ><LI ><P > <TT CLASS="LITERAL" >?</TT > denotes repetition of the previous item zero or one time. </P ></LI ><LI ><P > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >}</TT > denotes repetition of the previous item exactly <TT CLASS="REPLACEABLE" ><I >m</I ></TT > times. </P ></LI ><LI ><P > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,}</TT > denotes repetition of the previous item <TT CLASS="REPLACEABLE" ><I >m</I ></TT > or more times. </P ></LI ><LI ><P > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT ><TT CLASS="LITERAL" >}</TT > denotes repetition of the previous item at least <TT CLASS="REPLACEABLE" ><I >m</I ></TT > and not more than <TT CLASS="REPLACEABLE" ><I >n</I ></TT > times. </P ></LI ><LI ><P > Parentheses <TT CLASS="LITERAL" >()</TT > can be used to group items into a single logical item. </P ></LI ><LI ><P > A bracket expression <TT CLASS="LITERAL" >[...]</TT > specifies a character class, just as in POSIX regular expressions. </P ></LI ></UL ><P> Notice that the period (<TT CLASS="LITERAL" >.</TT >) is not a metacharacter for <CODE CLASS="FUNCTION" >SIMILAR TO</CODE >. </P ><P > As with <CODE CLASS="FUNCTION" >LIKE</CODE >, a backslash disables the special meaning of any of these metacharacters; or a different escape character can be specified with <TT CLASS="LITERAL" >ESCAPE</TT >. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" >'abc' SIMILAR TO 'abc' <I CLASS="LINEANNOTATION" >true</I > 'abc' SIMILAR TO 'a' <I CLASS="LINEANNOTATION" >false</I > 'abc' SIMILAR TO '%(b|d)%' <I CLASS="LINEANNOTATION" >true</I > 'abc' SIMILAR TO '(b|c)%' <I CLASS="LINEANNOTATION" >false</I ></PRE ><P> </P ><P > The <CODE CLASS="FUNCTION" >substring</CODE > function with three parameters, <CODE CLASS="FUNCTION" >substring(<TT CLASS="REPLACEABLE" ><I >string</I ></TT > from <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > for <TT CLASS="REPLACEABLE" ><I >escape-character</I ></TT >)</CODE >, provides extraction of a substring that matches an SQL regular expression pattern. As with <TT CLASS="LITERAL" >SIMILAR TO</TT >, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern that should be returned on success, the pattern must contain two occurrences of the escape character followed by a double quote (<TT CLASS="LITERAL" >"</TT >). The text matching the portion of the pattern between these markers is returned. </P ><P > Some examples, with <TT CLASS="LITERAL" >#"</TT > delimiting the return string: </P><PRE CLASS="PROGRAMLISTING" >substring('foobar' from '%#"o_b#"%' for '#') <I CLASS="LINEANNOTATION" >oob</I > substring('foobar' from '#"o_b#"%' for '#') <I CLASS="LINEANNOTATION" >NULL</I ></PRE ><P> </P ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="FUNCTIONS-POSIX-REGEXP" >9.7.3. <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM > Regular Expressions</A ></H2 ><P > <A HREF="functions-matching.html#FUNCTIONS-POSIX-TABLE" >Table 9-12</A > lists the available operators for pattern matching using POSIX regular expressions. </P ><DIV CLASS="TABLE" ><A NAME="FUNCTIONS-POSIX-TABLE" ></A ><P ><B >Table 9-12. Regular Expression Match Operators</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><THEAD ><TR ><TH >Operator</TH ><TH >Description</TH ><TH >Example</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >~</TT > </TD ><TD >Matches regular expression, case sensitive</TD ><TD ><TT CLASS="LITERAL" >'thomas' ~ '.*thomas.*'</TT ></TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >~*</TT > </TD ><TD >Matches regular expression, case insensitive</TD ><TD ><TT CLASS="LITERAL" >'thomas' ~* '.*Thomas.*'</TT ></TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >!~</TT > </TD ><TD >Does not match regular expression, case sensitive</TD ><TD ><TT CLASS="LITERAL" >'thomas' !~ '.*Thomas.*'</TT ></TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >!~*</TT > </TD ><TD >Does not match regular expression, case insensitive</TD ><TD ><TT CLASS="LITERAL" >'thomas' !~* '.*vadim.*'</TT ></TD ></TR ></TBODY ></TABLE ></DIV ><P > <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM > regular expressions provide a more powerful means for pattern matching than the <CODE CLASS="FUNCTION" >LIKE</CODE > and <CODE CLASS="FUNCTION" >SIMILAR TO</CODE > operators. Many Unix tools such as <TT CLASS="COMMAND" >egrep</TT >, <TT CLASS="COMMAND" >sed</TT >, or <TT CLASS="COMMAND" >awk</TT > use a pattern matching language that is similar to the one described here. </P ><P > A regular expression is a character sequence that is an abbreviated definition of a set of strings (a <I CLASS="FIRSTTERM" >regular set</I >). A string is said to match a regular expression if it is a member of the regular set described by the regular expression. As with <CODE CLASS="FUNCTION" >LIKE</CODE >, pattern characters match string characters exactly unless they are special characters in the regular expression language — but regular expressions use different special characters than <CODE CLASS="FUNCTION" >LIKE</CODE > does. Unlike <CODE CLASS="FUNCTION" >LIKE</CODE > patterns, a regular expression is allowed to match anywhere within a string, unless the regular expression is explicitly anchored to the beginning or end of the string. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" >'abc' ~ 'abc' <I CLASS="LINEANNOTATION" >true</I > 'abc' ~ '^a' <I CLASS="LINEANNOTATION" >true</I > 'abc' ~ '(b|d)' <I CLASS="LINEANNOTATION" >true</I > 'abc' ~ '^(b|c)' <I CLASS="LINEANNOTATION" >false</I ></PRE ><P> </P ><P > The <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM > pattern language is described in much greater detail below. </P ><P > The <CODE CLASS="FUNCTION" >substring</CODE > function with two parameters, <CODE CLASS="FUNCTION" >substring(<TT CLASS="REPLACEABLE" ><I >string</I ></TT > from <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT >)</CODE >, provides extraction of a substring that matches a POSIX regular expression pattern. It returns null if there is no match, otherwise the portion of the text that matched the pattern. But if the pattern contains any parentheses, the portion of the text that matched the first parenthesized subexpression (the one whose left parenthesis comes first) is returned. You can put parentheses around the whole expression if you want to use parentheses within it without triggering this exception. If you need parentheses in the pattern before the subexpression you want to extract, see the non-capturing parentheses described below. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" >substring('foobar' from 'o.b') <I CLASS="LINEANNOTATION" >oob</I > substring('foobar' from 'o(.)b') <I CLASS="LINEANNOTATION" >o</I ></PRE ><P> </P ><P > The <CODE CLASS="FUNCTION" >regexp_replace</CODE > function provides substitution of new text for substrings that match POSIX regular expression patterns. It has the syntax <CODE CLASS="FUNCTION" >regexp_replace</CODE >(<TT CLASS="REPLACEABLE" ><I >source</I ></TT >, <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT >, <TT CLASS="REPLACEABLE" ><I >replacement</I ></TT > [<SPAN CLASS="OPTIONAL" >, <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > </SPAN >]). The <TT CLASS="REPLACEABLE" ><I >source</I ></TT > string is returned unchanged if there is no match to the <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT >. If there is a match, the <TT CLASS="REPLACEABLE" ><I >source</I ></TT > string is returned with the <TT CLASS="REPLACEABLE" ><I >replacement</I ></TT > string substituted for the matching substring. The <TT CLASS="REPLACEABLE" ><I >replacement</I ></TT > string can contain <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT >, where <TT CLASS="REPLACEABLE" ><I >n</I ></TT > is 1 through 9, to indicate that the source substring matching the <TT CLASS="REPLACEABLE" ><I >n</I ></TT >'th parenthesized subexpression of the pattern should be inserted, and it can contain <TT CLASS="LITERAL" >\&</TT > to indicate that the substring matching the entire pattern should be inserted. Write <TT CLASS="LITERAL" >\\</TT > if you need to put a literal backslash in the replacement text. The <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > parameter is an optional text string containing zero or more single-letter flags that change the function's behavior. Flag <TT CLASS="LITERAL" >i</TT > specifies case-insensitive matching, while flag <TT CLASS="LITERAL" >g</TT > specifies replacement of each matching substring rather than only the first one. Other supported flags are described in <A HREF="functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE" >Table 9-20</A >. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" >regexp_replace('foobarbaz', 'b..', 'X') <I CLASS="LINEANNOTATION" >fooXbaz</I > regexp_replace('foobarbaz', 'b..', 'X', 'g') <I CLASS="LINEANNOTATION" >fooXX</I > regexp_replace('foobarbaz', 'b(..)', E'X\\1Y', 'g') <I CLASS="LINEANNOTATION" >fooXarYXazY</I ></PRE ><P> </P ><P > The <CODE CLASS="FUNCTION" >regexp_matches</CODE > function returns a text array of all of the captured substrings resulting from matching a POSIX regular expression pattern. It has the syntax <CODE CLASS="FUNCTION" >regexp_matches</CODE >(<TT CLASS="REPLACEABLE" ><I >string</I ></TT >, <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >, <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > </SPAN >]). The function can return no rows, one row, or multiple rows (see the <TT CLASS="LITERAL" >g</TT > flag below). If the <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > does not match, the function returns no rows. If the pattern contains no parenthesized subexpressions, then each row returned is a single-element text array containing the substring matching the whole pattern. If the pattern contains parenthesized subexpressions, the function returns a text array whose <TT CLASS="REPLACEABLE" ><I >n</I ></TT >'th element is the substring matching the <TT CLASS="REPLACEABLE" ><I >n</I ></TT >'th parenthesized subexpression of the pattern (not counting <SPAN CLASS="QUOTE" >"non-capturing"</SPAN > parentheses; see below for details). The <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > parameter is an optional text string containing zero or more single-letter flags that change the function's behavior. Flag <TT CLASS="LITERAL" >g</TT > causes the function to find each match in the string, not only the first one, and return a row for each such match. Other supported flags are described in <A HREF="functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE" >Table 9-20</A >. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" >SELECT regexp_matches('foobarbequebaz', '(bar)(beque)'); regexp_matches ---------------- {bar,beque} (1 row) SELECT regexp_matches('foobarbequebazilbarfbonk', '(b[^b]+)(b[^b]+)', 'g'); regexp_matches ---------------- {bar,beque} {bazil,barf} (2 rows) SELECT regexp_matches('foobarbequebaz', 'barbeque'); regexp_matches ---------------- {barbeque} (1 row)</PRE ><P> </P ><P > It is possible to force <CODE CLASS="FUNCTION" >regexp_matches()</CODE > to always return one row by using a sub-select; this is particularly useful in a <TT CLASS="LITERAL" >SELECT</TT > target list when you want all rows returned, even non-matching ones: </P><PRE CLASS="PROGRAMLISTING" >SELECT col1, (SELECT regexp_matches(col2, '(bar)(beque)')) FROM tab;</PRE ><P> </P ><P > The <CODE CLASS="FUNCTION" >regexp_split_to_table</CODE > function splits a string using a POSIX regular expression pattern as a delimiter. It has the syntax <CODE CLASS="FUNCTION" >regexp_split_to_table</CODE >(<TT CLASS="REPLACEABLE" ><I >string</I ></TT >, <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >, <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > </SPAN >]). If there is no match to the <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT >, the function returns the <TT CLASS="REPLACEABLE" ><I >string</I ></TT >. If there is at least one match, for each match it returns the text from the end of the last match (or the beginning of the string) to the beginning of the match. When there are no more matches, it returns the text from the end of the last match to the end of the string. The <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > parameter is an optional text string containing zero or more single-letter flags that change the function's behavior. <CODE CLASS="FUNCTION" >regexp_split_to_table</CODE > supports the flags described in <A HREF="functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE" >Table 9-20</A >. </P ><P > The <CODE CLASS="FUNCTION" >regexp_split_to_array</CODE > function behaves the same as <CODE CLASS="FUNCTION" >regexp_split_to_table</CODE >, except that <CODE CLASS="FUNCTION" >regexp_split_to_array</CODE > returns its result as an array of <TT CLASS="TYPE" >text</TT >. It has the syntax <CODE CLASS="FUNCTION" >regexp_split_to_array</CODE >(<TT CLASS="REPLACEABLE" ><I >string</I ></TT >, <TT CLASS="REPLACEABLE" ><I >pattern</I ></TT > [<SPAN CLASS="OPTIONAL" >, <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > </SPAN >]). The parameters are the same as for <CODE CLASS="FUNCTION" >regexp_split_to_table</CODE >. </P ><P > Some examples: </P><PRE CLASS="PROGRAMLISTING" > SELECT foo FROM regexp_split_to_table('the quick brown fox jumped over the lazy dog', E'\\s+') AS foo; foo -------- the quick brown fox jumped over the lazy dog (9 rows) SELECT regexp_split_to_array('the quick brown fox jumped over the lazy dog', E'\\s+'); regexp_split_to_array ------------------------------------------------ {the,quick,brown,fox,jumped,over,the,lazy,dog} (1 row) SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; foo ----- t h e q u i c k b r o w n f o x (16 rows)</PRE ><P> </P ><P > As the last example demonstrates, the regexp split functions ignore zero-length matches that occur at the start or end of the string or immediately after a previous match. This is contrary to the strict definition of regexp matching that is implemented by <CODE CLASS="FUNCTION" >regexp_matches</CODE >, but is usually the most convenient behavior in practice. Other software systems such as Perl use similar definitions. </P ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-SYNTAX-DETAILS" >9.7.3.1. Regular Expression Details</A ></H3 ><P > <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >'s regular expressions are implemented using a software package written by Henry Spencer. Much of the description of regular expressions below is copied verbatim from his manual. </P ><P > Regular expressions (<ACRONYM CLASS="ACRONYM" >RE</ACRONYM >s), as defined in <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM > 1003.2, come in two forms: <I CLASS="FIRSTTERM" >extended</I > <ACRONYM CLASS="ACRONYM" >RE</ACRONYM >s or <ACRONYM CLASS="ACRONYM" >ERE</ACRONYM >s (roughly those of <TT CLASS="COMMAND" >egrep</TT >), and <I CLASS="FIRSTTERM" >basic</I > <ACRONYM CLASS="ACRONYM" >RE</ACRONYM >s or <ACRONYM CLASS="ACRONYM" >BRE</ACRONYM >s (roughly those of <TT CLASS="COMMAND" >ed</TT >). <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > supports both forms, and also implements some extensions that are not in the POSIX standard, but have become widely used due to their availability in programming languages such as Perl and Tcl. <ACRONYM CLASS="ACRONYM" >RE</ACRONYM >s using these non-POSIX extensions are called <I CLASS="FIRSTTERM" >advanced</I > <ACRONYM CLASS="ACRONYM" >RE</ACRONYM >s or <ACRONYM CLASS="ACRONYM" >ARE</ACRONYM >s in this documentation. AREs are almost an exact superset of EREs, but BREs have several notational incompatibilities (as well as being much more limited). We first describe the ARE and ERE forms, noting features that apply only to AREs, and then describe how BREs differ. </P ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > always initially presumes that a regular expression follows the ARE rules. However, the more limited ERE or BRE rules can be chosen by prepending an <I CLASS="FIRSTTERM" >embedded option</I > to the RE pattern, as described in <A HREF="functions-matching.html#POSIX-METASYNTAX" >Section 9.7.3.4</A >. This can be useful for compatibility with applications that expect exactly the <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM > 1003.2 rules. </P ></BLOCKQUOTE ></DIV ><P > A regular expression is defined as one or more <I CLASS="FIRSTTERM" >branches</I >, separated by <TT CLASS="LITERAL" >|</TT >. It matches anything that matches one of the branches. </P ><P > A branch is zero or more <I CLASS="FIRSTTERM" >quantified atoms</I > or <I CLASS="FIRSTTERM" >constraints</I >, concatenated. It matches a match for the first, followed by a match for the second, etc; an empty branch matches the empty string. </P ><P > A quantified atom is an <I CLASS="FIRSTTERM" >atom</I > possibly followed by a single <I CLASS="FIRSTTERM" >quantifier</I >. Without a quantifier, it matches a match for the atom. With a quantifier, it can match some number of matches of the atom. An <I CLASS="FIRSTTERM" >atom</I > can be any of the possibilities shown in <A HREF="functions-matching.html#POSIX-ATOMS-TABLE" >Table 9-13</A >. The possible quantifiers and their meanings are shown in <A HREF="functions-matching.html#POSIX-QUANTIFIERS-TABLE" >Table 9-14</A >. </P ><P > A <I CLASS="FIRSTTERM" >constraint</I > matches an empty string, but matches only when specific conditions are met. A constraint can be used where an atom could be used, except it cannot be followed by a quantifier. The simple constraints are shown in <A HREF="functions-matching.html#POSIX-CONSTRAINTS-TABLE" >Table 9-15</A >; some more constraints are described later. </P ><DIV CLASS="TABLE" ><A NAME="POSIX-ATOMS-TABLE" ></A ><P ><B >Table 9-13. Regular Expression Atoms</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Atom</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >(</TT ><TT CLASS="REPLACEABLE" ><I >re</I ></TT ><TT CLASS="LITERAL" >)</TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >re</I ></TT > is any regular expression) matches a match for <TT CLASS="REPLACEABLE" ><I >re</I ></TT >, with the match noted for possible reporting </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >(?:</TT ><TT CLASS="REPLACEABLE" ><I >re</I ></TT ><TT CLASS="LITERAL" >)</TT > </TD ><TD > as above, but the match is not noted for reporting (a <SPAN CLASS="QUOTE" >"non-capturing"</SPAN > set of parentheses) (AREs only) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >.</TT > </TD ><TD > matches any single character </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >[</TT ><TT CLASS="REPLACEABLE" ><I >chars</I ></TT ><TT CLASS="LITERAL" >]</TT > </TD ><TD > a <I CLASS="FIRSTTERM" >bracket expression</I >, matching any one of the <TT CLASS="REPLACEABLE" ><I >chars</I ></TT > (see <A HREF="functions-matching.html#POSIX-BRACKET-EXPRESSIONS" >Section 9.7.3.2</A > for more detail) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >k</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >k</I ></TT > is a non-alphanumeric character) matches that character taken as an ordinary character, e.g., <TT CLASS="LITERAL" >\\</TT > matches a backslash character </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >c</I ></TT > </TD ><TD > where <TT CLASS="REPLACEABLE" ><I >c</I ></TT > is alphanumeric (possibly followed by other characters) is an <I CLASS="FIRSTTERM" >escape</I >, see <A HREF="functions-matching.html#POSIX-ESCAPE-SEQUENCES" >Section 9.7.3.3</A > (AREs only; in EREs and BREs, this matches <TT CLASS="REPLACEABLE" ><I >c</I ></TT >) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT > </TD ><TD > when followed by a character other than a digit, matches the left-brace character <TT CLASS="LITERAL" >{</TT >; when followed by a digit, it is the beginning of a <TT CLASS="REPLACEABLE" ><I >bound</I ></TT > (see below) </TD ></TR ><TR ><TD > <TT CLASS="REPLACEABLE" ><I >x</I ></TT > </TD ><TD > where <TT CLASS="REPLACEABLE" ><I >x</I ></TT > is a single character with no other significance, matches that character </TD ></TR ></TBODY ></TABLE ></DIV ><P > An RE cannot end with a backslash (<TT CLASS="LITERAL" >\</TT >). </P ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > If you have <A HREF="runtime-config-compatible.html#GUC-STANDARD-CONFORMING-STRINGS" >standard_conforming_strings</A > turned off, any backslashes you write in literal string constants will need to be doubled. See <A HREF="sql-syntax-lexical.html#SQL-SYNTAX-STRINGS" >Section 4.1.2.1</A > for more information. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="TABLE" ><A NAME="POSIX-QUANTIFIERS-TABLE" ></A ><P ><B >Table 9-14. Regular Expression Quantifiers</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Quantifier</TH ><TH >Matches</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >*</TT > </TD ><TD > a sequence of 0 or more matches of the atom </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >+</TT > </TD ><TD > a sequence of 1 or more matches of the atom </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >?</TT > </TD ><TD > a sequence of 0 or 1 matches of the atom </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >}</TT > </TD ><TD > a sequence of exactly <TT CLASS="REPLACEABLE" ><I >m</I ></TT > matches of the atom </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,}</TT > </TD ><TD > a sequence of <TT CLASS="REPLACEABLE" ><I >m</I ></TT > or more matches of the atom </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT ><TT CLASS="LITERAL" >}</TT > </TD ><TD > a sequence of <TT CLASS="REPLACEABLE" ><I >m</I ></TT > through <TT CLASS="REPLACEABLE" ><I >n</I ></TT > (inclusive) matches of the atom; <TT CLASS="REPLACEABLE" ><I >m</I ></TT > cannot exceed <TT CLASS="REPLACEABLE" ><I >n</I ></TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >*?</TT > </TD ><TD > non-greedy version of <TT CLASS="LITERAL" >*</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >+?</TT > </TD ><TD > non-greedy version of <TT CLASS="LITERAL" >+</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >??</TT > </TD ><TD > non-greedy version of <TT CLASS="LITERAL" >?</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >}?</TT > </TD ><TD > non-greedy version of <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >}</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,}?</TT > </TD ><TD > non-greedy version of <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,}</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT ><TT CLASS="LITERAL" >}?</TT > </TD ><TD > non-greedy version of <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT ><TT CLASS="LITERAL" >}</TT > </TD ></TR ></TBODY ></TABLE ></DIV ><P > The forms using <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >...</I ></TT ><TT CLASS="LITERAL" >}</TT > are known as <I CLASS="FIRSTTERM" >bounds</I >. The numbers <TT CLASS="REPLACEABLE" ><I >m</I ></TT > and <TT CLASS="REPLACEABLE" ><I >n</I ></TT > within a bound are unsigned decimal integers with permissible values from 0 to 255 inclusive. </P ><P > <I CLASS="FIRSTTERM" >Non-greedy</I > quantifiers (available in AREs only) match the same possibilities as their corresponding normal (<I CLASS="FIRSTTERM" >greedy</I >) counterparts, but prefer the smallest number rather than the largest number of matches. See <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A > for more detail. </P ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > A quantifier cannot immediately follow another quantifier, e.g., <TT CLASS="LITERAL" >**</TT > is invalid. A quantifier cannot begin an expression or subexpression or follow <TT CLASS="LITERAL" >^</TT > or <TT CLASS="LITERAL" >|</TT >. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="TABLE" ><A NAME="POSIX-CONSTRAINTS-TABLE" ></A ><P ><B >Table 9-15. Regular Expression Constraints</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Constraint</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >^</TT > </TD ><TD > matches at the beginning of the string </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >$</TT > </TD ><TD > matches at the end of the string </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >(?=</TT ><TT CLASS="REPLACEABLE" ><I >re</I ></TT ><TT CLASS="LITERAL" >)</TT > </TD ><TD > <I CLASS="FIRSTTERM" >positive lookahead</I > matches at any point where a substring matching <TT CLASS="REPLACEABLE" ><I >re</I ></TT > begins (AREs only) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >(?!</TT ><TT CLASS="REPLACEABLE" ><I >re</I ></TT ><TT CLASS="LITERAL" >)</TT > </TD ><TD > <I CLASS="FIRSTTERM" >negative lookahead</I > matches at any point where no substring matching <TT CLASS="REPLACEABLE" ><I >re</I ></TT > begins (AREs only) </TD ></TR ></TBODY ></TABLE ></DIV ><P > Lookahead constraints cannot contain <I CLASS="FIRSTTERM" >back references</I > (see <A HREF="functions-matching.html#POSIX-ESCAPE-SEQUENCES" >Section 9.7.3.3</A >), and all parentheses within them are considered non-capturing. </P ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-BRACKET-EXPRESSIONS" >9.7.3.2. Bracket Expressions</A ></H3 ><P > A <I CLASS="FIRSTTERM" >bracket expression</I > is a list of characters enclosed in <TT CLASS="LITERAL" >[]</TT >. It normally matches any single character from the list (but see below). If the list begins with <TT CLASS="LITERAL" >^</TT >, it matches any single character <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >not</I ></SPAN > from the rest of the list. If two characters in the list are separated by <TT CLASS="LITERAL" >-</TT >, this is shorthand for the full range of characters between those two (inclusive) in the collating sequence, e.g., <TT CLASS="LITERAL" >[0-9]</TT > in <ACRONYM CLASS="ACRONYM" >ASCII</ACRONYM > matches any decimal digit. It is illegal for two ranges to share an endpoint, e.g., <TT CLASS="LITERAL" >a-c-e</TT >. Ranges are very collating-sequence-dependent, so portable programs should avoid relying on them. </P ><P > To include a literal <TT CLASS="LITERAL" >]</TT > in the list, make it the first character (after <TT CLASS="LITERAL" >^</TT >, if that is used). To include a literal <TT CLASS="LITERAL" >-</TT >, make it the first or last character, or the second endpoint of a range. To use a literal <TT CLASS="LITERAL" >-</TT > as the first endpoint of a range, enclose it in <TT CLASS="LITERAL" >[.</TT > and <TT CLASS="LITERAL" >.]</TT > to make it a collating element (see below). With the exception of these characters, some combinations using <TT CLASS="LITERAL" >[</TT > (see next paragraphs), and escapes (AREs only), all other special characters lose their special significance within a bracket expression. In particular, <TT CLASS="LITERAL" >\</TT > is not special when following ERE or BRE rules, though it is special (as introducing an escape) in AREs. </P ><P > Within a bracket expression, a collating element (a character, a multiple-character sequence that collates as if it were a single character, or a collating-sequence name for either) enclosed in <TT CLASS="LITERAL" >[.</TT > and <TT CLASS="LITERAL" >.]</TT > stands for the sequence of characters of that collating element. The sequence is treated as a single element of the bracket expression's list. This allows a bracket expression containing a multiple-character collating element to match more than one character, e.g., if the collating sequence includes a <TT CLASS="LITERAL" >ch</TT > collating element, then the RE <TT CLASS="LITERAL" >[[.ch.]]*c</TT > matches the first five characters of <TT CLASS="LITERAL" >chchcc</TT >. </P ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > currently does not support multi-character collating elements. This information describes possible future behavior. </P ></BLOCKQUOTE ></DIV ><P > Within a bracket expression, a collating element enclosed in <TT CLASS="LITERAL" >[=</TT > and <TT CLASS="LITERAL" >=]</TT > is an <I CLASS="FIRSTTERM" >equivalence class</I >, standing for the sequences of characters of all collating elements equivalent to that one, including itself. (If there are no other equivalent collating elements, the treatment is as if the enclosing delimiters were <TT CLASS="LITERAL" >[.</TT > and <TT CLASS="LITERAL" >.]</TT >.) For example, if <TT CLASS="LITERAL" >o</TT > and <TT CLASS="LITERAL" >^</TT > are the members of an equivalence class, then <TT CLASS="LITERAL" >[[=o=]]</TT >, <TT CLASS="LITERAL" >[[=^=]]</TT >, and <TT CLASS="LITERAL" >[o^]</TT > are all synonymous. An equivalence class cannot be an endpoint of a range. </P ><P > Within a bracket expression, the name of a character class enclosed in <TT CLASS="LITERAL" >[:</TT > and <TT CLASS="LITERAL" >:]</TT > stands for the list of all characters belonging to that class. Standard character class names are: <TT CLASS="LITERAL" >alnum</TT >, <TT CLASS="LITERAL" >alpha</TT >, <TT CLASS="LITERAL" >blank</TT >, <TT CLASS="LITERAL" >cntrl</TT >, <TT CLASS="LITERAL" >digit</TT >, <TT CLASS="LITERAL" >graph</TT >, <TT CLASS="LITERAL" >lower</TT >, <TT CLASS="LITERAL" >print</TT >, <TT CLASS="LITERAL" >punct</TT >, <TT CLASS="LITERAL" >space</TT >, <TT CLASS="LITERAL" >upper</TT >, <TT CLASS="LITERAL" >xdigit</TT >. These stand for the character classes defined in <SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >ctype</SPAN ></SPAN >. A locale can provide others. A character class cannot be used as an endpoint of a range. </P ><P > There are two special cases of bracket expressions: the bracket expressions <TT CLASS="LITERAL" >[[:<:]]</TT > and <TT CLASS="LITERAL" >[[:>:]]</TT > are constraints, matching empty strings at the beginning and end of a word respectively. A word is defined as a sequence of word characters that is neither preceded nor followed by word characters. A word character is an <TT CLASS="LITERAL" >alnum</TT > character (as defined by <SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >ctype</SPAN ></SPAN >) or an underscore. This is an extension, compatible with but not specified by <ACRONYM CLASS="ACRONYM" >POSIX</ACRONYM > 1003.2, and should be used with caution in software intended to be portable to other systems. The constraint escapes described below are usually preferable; they are no more standard, but are easier to type. </P ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-ESCAPE-SEQUENCES" >9.7.3.3. Regular Expression Escapes</A ></H3 ><P > <I CLASS="FIRSTTERM" >Escapes</I > are special sequences beginning with <TT CLASS="LITERAL" >\</TT > followed by an alphanumeric character. Escapes come in several varieties: character entry, class shorthands, constraint escapes, and back references. A <TT CLASS="LITERAL" >\</TT > followed by an alphanumeric character but not constituting a valid escape is illegal in AREs. In EREs, there are no escapes: outside a bracket expression, a <TT CLASS="LITERAL" >\</TT > followed by an alphanumeric character merely stands for that character as an ordinary character, and inside a bracket expression, <TT CLASS="LITERAL" >\</TT > is an ordinary character. (The latter is the one actual incompatibility between EREs and AREs.) </P ><P > <I CLASS="FIRSTTERM" >Character-entry escapes</I > exist to make it easier to specify non-printing and other inconvenient characters in REs. They are shown in <A HREF="functions-matching.html#POSIX-CHARACTER-ENTRY-ESCAPES-TABLE" >Table 9-16</A >. </P ><P > <I CLASS="FIRSTTERM" >Class-shorthand escapes</I > provide shorthands for certain commonly-used character classes. They are shown in <A HREF="functions-matching.html#POSIX-CLASS-SHORTHAND-ESCAPES-TABLE" >Table 9-17</A >. </P ><P > A <I CLASS="FIRSTTERM" >constraint escape</I > is a constraint, matching the empty string if specific conditions are met, written as an escape. They are shown in <A HREF="functions-matching.html#POSIX-CONSTRAINT-ESCAPES-TABLE" >Table 9-18</A >. </P ><P > A <I CLASS="FIRSTTERM" >back reference</I > (<TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT >) matches the same string matched by the previous parenthesized subexpression specified by the number <TT CLASS="REPLACEABLE" ><I >n</I ></TT > (see <A HREF="functions-matching.html#POSIX-CONSTRAINT-BACKREF-TABLE" >Table 9-19</A >). For example, <TT CLASS="LITERAL" >([bc])\1</TT > matches <TT CLASS="LITERAL" >bb</TT > or <TT CLASS="LITERAL" >cc</TT > but not <TT CLASS="LITERAL" >bc</TT > or <TT CLASS="LITERAL" >cb</TT >. The subexpression must entirely precede the back reference in the RE. Subexpressions are numbered in the order of their leading parentheses. Non-capturing parentheses do not define subexpressions. </P ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > Keep in mind that an escape's leading <TT CLASS="LITERAL" >\</TT > will need to be doubled when entering the pattern as an SQL string constant. For example: </P><PRE CLASS="PROGRAMLISTING" >'123' ~ E'^\\d{3}' <I CLASS="LINEANNOTATION" >true</I ></PRE ><P> </P ></BLOCKQUOTE ></DIV ><DIV CLASS="TABLE" ><A NAME="POSIX-CHARACTER-ENTRY-ESCAPES-TABLE" ></A ><P ><B >Table 9-16. Regular Expression Character-entry Escapes</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Escape</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >\a</TT > </TD ><TD > alert (bell) character, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\b</TT > </TD ><TD > backspace, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\B</TT > </TD ><TD > synonym for backslash (<TT CLASS="LITERAL" >\</TT >) to help reduce the need for backslash doubling </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\c</TT ><TT CLASS="REPLACEABLE" ><I >X</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >X</I ></TT > is any character) the character whose low-order 5 bits are the same as those of <TT CLASS="REPLACEABLE" ><I >X</I ></TT >, and whose other bits are all zero </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\e</TT > </TD ><TD > the character whose collating-sequence name is <TT CLASS="LITERAL" >ESC</TT >, or failing that, the character with octal value <TT CLASS="LITERAL" >033</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\f</TT > </TD ><TD > form feed, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\n</TT > </TD ><TD > newline, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\r</TT > </TD ><TD > carriage return, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\t</TT > </TD ><TD > horizontal tab, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\u</TT ><TT CLASS="REPLACEABLE" ><I >wxyz</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >wxyz</I ></TT > is exactly four hexadecimal digits) the character whose hexadecimal value is <TT CLASS="LITERAL" >0x</TT ><TT CLASS="REPLACEABLE" ><I >wxyz</I ></TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\U</TT ><TT CLASS="REPLACEABLE" ><I >stuvwxyz</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >stuvwxyz</I ></TT > is exactly eight hexadecimal digits) the character whose hexadecimal value is <TT CLASS="LITERAL" >0x</TT ><TT CLASS="REPLACEABLE" ><I >stuvwxyz</I ></TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\v</TT > </TD ><TD > vertical tab, as in C </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\x</TT ><TT CLASS="REPLACEABLE" ><I >hhh</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >hhh</I ></TT > is any sequence of hexadecimal digits) the character whose hexadecimal value is <TT CLASS="LITERAL" >0x</TT ><TT CLASS="REPLACEABLE" ><I >hhh</I ></TT > (a single character no matter how many hexadecimal digits are used) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\0</TT > </TD ><TD > the character whose value is <TT CLASS="LITERAL" >0</TT > (the null byte)</TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >xy</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >xy</I ></TT > is exactly two octal digits, and is not a <I CLASS="FIRSTTERM" >back reference</I >) the character whose octal value is <TT CLASS="LITERAL" >0</TT ><TT CLASS="REPLACEABLE" ><I >xy</I ></TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >xyz</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >xyz</I ></TT > is exactly three octal digits, and is not a <I CLASS="FIRSTTERM" >back reference</I >) the character whose octal value is <TT CLASS="LITERAL" >0</TT ><TT CLASS="REPLACEABLE" ><I >xyz</I ></TT > </TD ></TR ></TBODY ></TABLE ></DIV ><P > Hexadecimal digits are <TT CLASS="LITERAL" >0</TT >-<TT CLASS="LITERAL" >9</TT >, <TT CLASS="LITERAL" >a</TT >-<TT CLASS="LITERAL" >f</TT >, and <TT CLASS="LITERAL" >A</TT >-<TT CLASS="LITERAL" >F</TT >. Octal digits are <TT CLASS="LITERAL" >0</TT >-<TT CLASS="LITERAL" >7</TT >. </P ><P > Numeric character-entry escapes specifying values outside the ASCII range (0-127) have meanings dependent on the database encoding. When the encoding is UTF-8, escape values are equivalent to Unicode code points, for example <TT CLASS="LITERAL" >\u1234</TT > means the character <TT CLASS="LITERAL" >U+1234</TT >. For other multibyte encodings, character-entry escapes usually just specify the concatenation of the byte values for the character. If the escape value does not correspond to any legal character in the database encoding, no error will be raised, but it will never match any data. </P ><P > The character-entry escapes are always taken as ordinary characters. For example, <TT CLASS="LITERAL" >\135</TT > is <TT CLASS="LITERAL" >]</TT > in ASCII, but <TT CLASS="LITERAL" >\135</TT > does not terminate a bracket expression. </P ><DIV CLASS="TABLE" ><A NAME="POSIX-CLASS-SHORTHAND-ESCAPES-TABLE" ></A ><P ><B >Table 9-17. Regular Expression Class-shorthand Escapes</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Escape</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >\d</TT > </TD ><TD > <TT CLASS="LITERAL" >[[:digit:]]</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\s</TT > </TD ><TD > <TT CLASS="LITERAL" >[[:space:]]</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\w</TT > </TD ><TD > <TT CLASS="LITERAL" >[[:alnum:]_]</TT > (note underscore is included) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\D</TT > </TD ><TD > <TT CLASS="LITERAL" >[^[:digit:]]</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\S</TT > </TD ><TD > <TT CLASS="LITERAL" >[^[:space:]]</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\W</TT > </TD ><TD > <TT CLASS="LITERAL" >[^[:alnum:]_]</TT > (note underscore is included) </TD ></TR ></TBODY ></TABLE ></DIV ><P > Within bracket expressions, <TT CLASS="LITERAL" >\d</TT >, <TT CLASS="LITERAL" >\s</TT >, and <TT CLASS="LITERAL" >\w</TT > lose their outer brackets, and <TT CLASS="LITERAL" >\D</TT >, <TT CLASS="LITERAL" >\S</TT >, and <TT CLASS="LITERAL" >\W</TT > are illegal. (So, for example, <TT CLASS="LITERAL" >[a-c\d]</TT > is equivalent to <TT CLASS="LITERAL" >[a-c[:digit:]]</TT >. Also, <TT CLASS="LITERAL" >[a-c\D]</TT >, which is equivalent to <TT CLASS="LITERAL" >[a-c^[:digit:]]</TT >, is illegal.) </P ><DIV CLASS="TABLE" ><A NAME="POSIX-CONSTRAINT-ESCAPES-TABLE" ></A ><P ><B >Table 9-18. Regular Expression Constraint Escapes</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Escape</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >\A</TT > </TD ><TD > matches only at the beginning of the string (see <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A > for how this differs from <TT CLASS="LITERAL" >^</TT >) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\m</TT > </TD ><TD > matches only at the beginning of a word </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\M</TT > </TD ><TD > matches only at the end of a word </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\y</TT > </TD ><TD > matches only at the beginning or end of a word </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\Y</TT > </TD ><TD > matches only at a point that is not the beginning or end of a word </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\Z</TT > </TD ><TD > matches only at the end of the string (see <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A > for how this differs from <TT CLASS="LITERAL" >$</TT >) </TD ></TR ></TBODY ></TABLE ></DIV ><P > A word is defined as in the specification of <TT CLASS="LITERAL" >[[:<:]]</TT > and <TT CLASS="LITERAL" >[[:>:]]</TT > above. Constraint escapes are illegal within bracket expressions. </P ><DIV CLASS="TABLE" ><A NAME="POSIX-CONSTRAINT-BACKREF-TABLE" ></A ><P ><B >Table 9-19. Regular Expression Back References</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Escape</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >m</I ></TT > is a nonzero digit) a back reference to the <TT CLASS="REPLACEABLE" ><I >m</I ></TT >'th subexpression </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >\</TT ><TT CLASS="REPLACEABLE" ><I >mnn</I ></TT > </TD ><TD > (where <TT CLASS="REPLACEABLE" ><I >m</I ></TT > is a nonzero digit, and <TT CLASS="REPLACEABLE" ><I >nn</I ></TT > is some more digits, and the decimal value <TT CLASS="REPLACEABLE" ><I >mnn</I ></TT > is not greater than the number of closing capturing parentheses seen so far) a back reference to the <TT CLASS="REPLACEABLE" ><I >mnn</I ></TT >'th subexpression </TD ></TR ></TBODY ></TABLE ></DIV ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="NOTE" ><P ><B >Note: </B > There is an inherent ambiguity between octal character-entry escapes and back references, which is resolved by the following heuristics, as hinted at above. A leading zero always indicates an octal escape. A single non-zero digit, not followed by another digit, is always taken as a back reference. A multi-digit sequence not starting with a zero is taken as a back reference if it comes after a suitable subexpression (i.e., the number is in the legal range for a back reference), and otherwise is taken as octal. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-METASYNTAX" >9.7.3.4. Regular Expression Metasyntax</A ></H3 ><P > In addition to the main syntax described above, there are some special forms and miscellaneous syntactic facilities available. </P ><P > An RE can begin with one of two special <I CLASS="FIRSTTERM" >director</I > prefixes. If an RE begins with <TT CLASS="LITERAL" >***:</TT >, the rest of the RE is taken as an ARE. (This normally has no effect in <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >, since REs are assumed to be AREs; but it does have an effect if ERE or BRE mode had been specified by the <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > parameter to a regex function.) If an RE begins with <TT CLASS="LITERAL" >***=</TT >, the rest of the RE is taken to be a literal string, with all characters considered ordinary characters. </P ><P > An ARE can begin with <I CLASS="FIRSTTERM" >embedded options</I >: a sequence <TT CLASS="LITERAL" >(?</TT ><TT CLASS="REPLACEABLE" ><I >xyz</I ></TT ><TT CLASS="LITERAL" >)</TT > (where <TT CLASS="REPLACEABLE" ><I >xyz</I ></TT > is one or more alphabetic characters) specifies options affecting the rest of the RE. These options override any previously determined options — in particular, they can override the case-sensitivity behavior implied by a regex operator, or the <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > parameter to a regex function. The available option letters are shown in <A HREF="functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE" >Table 9-20</A >. Note that these same option letters are used in the <TT CLASS="REPLACEABLE" ><I >flags</I ></TT > parameters of regex functions. </P ><DIV CLASS="TABLE" ><A NAME="POSIX-EMBEDDED-OPTIONS-TABLE" ></A ><P ><B >Table 9-20. ARE Embedded-option Letters</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Option</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD > <TT CLASS="LITERAL" >b</TT > </TD ><TD > rest of RE is a BRE </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >c</TT > </TD ><TD > case-sensitive matching (overrides operator type) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >e</TT > </TD ><TD > rest of RE is an ERE </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >i</TT > </TD ><TD > case-insensitive matching (see <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A >) (overrides operator type) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >m</TT > </TD ><TD > historical synonym for <TT CLASS="LITERAL" >n</TT > </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >n</TT > </TD ><TD > newline-sensitive matching (see <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A >) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >p</TT > </TD ><TD > partial newline-sensitive matching (see <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A >) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >q</TT > </TD ><TD > rest of RE is a literal (<SPAN CLASS="QUOTE" >"quoted"</SPAN >) string, all ordinary characters </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >s</TT > </TD ><TD > non-newline-sensitive matching (default) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >t</TT > </TD ><TD > tight syntax (default; see below) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >w</TT > </TD ><TD > inverse partial newline-sensitive (<SPAN CLASS="QUOTE" >"weird"</SPAN >) matching (see <A HREF="functions-matching.html#POSIX-MATCHING-RULES" >Section 9.7.3.5</A >) </TD ></TR ><TR ><TD > <TT CLASS="LITERAL" >x</TT > </TD ><TD > expanded syntax (see below) </TD ></TR ></TBODY ></TABLE ></DIV ><P > Embedded options take effect at the <TT CLASS="LITERAL" >)</TT > terminating the sequence. They can appear only at the start of an ARE (after the <TT CLASS="LITERAL" >***:</TT > director if any). </P ><P > In addition to the usual (<I CLASS="FIRSTTERM" >tight</I >) RE syntax, in which all characters are significant, there is an <I CLASS="FIRSTTERM" >expanded</I > syntax, available by specifying the embedded <TT CLASS="LITERAL" >x</TT > option. In the expanded syntax, white-space characters in the RE are ignored, as are all characters between a <TT CLASS="LITERAL" >#</TT > and the following newline (or the end of the RE). This permits paragraphing and commenting a complex RE. There are three exceptions to that basic rule: <P ></P ></P><UL ><LI ><P > a white-space character or <TT CLASS="LITERAL" >#</TT > preceded by <TT CLASS="LITERAL" >\</TT > is retained </P ></LI ><LI ><P > white space or <TT CLASS="LITERAL" >#</TT > within a bracket expression is retained </P ></LI ><LI ><P > white space and comments cannot appear within multi-character symbols, such as <TT CLASS="LITERAL" >(?:</TT > </P ></LI ></UL ><P> For this purpose, white-space characters are blank, tab, newline, and any character that belongs to the <TT CLASS="REPLACEABLE" ><I >space</I ></TT > character class. </P ><P > Finally, in an ARE, outside bracket expressions, the sequence <TT CLASS="LITERAL" >(?#</TT ><TT CLASS="REPLACEABLE" ><I >ttt</I ></TT ><TT CLASS="LITERAL" >)</TT > (where <TT CLASS="REPLACEABLE" ><I >ttt</I ></TT > is any text not containing a <TT CLASS="LITERAL" >)</TT >) is a comment, completely ignored. Again, this is not allowed between the characters of multi-character symbols, like <TT CLASS="LITERAL" >(?:</TT >. Such comments are more a historical artifact than a useful facility, and their use is deprecated; use the expanded syntax instead. </P ><P > <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >None</I ></SPAN > of these metasyntax extensions is available if an initial <TT CLASS="LITERAL" >***=</TT > director has specified that the user's input be treated as a literal string rather than as an RE. </P ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-MATCHING-RULES" >9.7.3.5. Regular Expression Matching Rules</A ></H3 ><P > In the event that an RE could match more than one substring of a given string, the RE matches the one starting earliest in the string. If the RE could match more than one substring starting at that point, either the longest possible match or the shortest possible match will be taken, depending on whether the RE is <I CLASS="FIRSTTERM" >greedy</I > or <I CLASS="FIRSTTERM" >non-greedy</I >. </P ><P > Whether an RE is greedy or not is determined by the following rules: <P ></P ></P><UL ><LI ><P > Most atoms, and all constraints, have no greediness attribute (because they cannot match variable amounts of text anyway). </P ></LI ><LI ><P > Adding parentheses around an RE does not change its greediness. </P ></LI ><LI ><P > A quantified atom with a fixed-repetition quantifier (<TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >}</TT > or <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >}?</TT >) has the same greediness (possibly none) as the atom itself. </P ></LI ><LI ><P > A quantified atom with other normal quantifiers (including <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT ><TT CLASS="LITERAL" >}</TT > with <TT CLASS="REPLACEABLE" ><I >m</I ></TT > equal to <TT CLASS="REPLACEABLE" ><I >n</I ></TT >) is greedy (prefers longest match). </P ></LI ><LI ><P > A quantified atom with a non-greedy quantifier (including <TT CLASS="LITERAL" >{</TT ><TT CLASS="REPLACEABLE" ><I >m</I ></TT ><TT CLASS="LITERAL" >,</TT ><TT CLASS="REPLACEABLE" ><I >n</I ></TT ><TT CLASS="LITERAL" >}?</TT > with <TT CLASS="REPLACEABLE" ><I >m</I ></TT > equal to <TT CLASS="REPLACEABLE" ><I >n</I ></TT >) is non-greedy (prefers shortest match). </P ></LI ><LI ><P > A branch — that is, an RE that has no top-level <TT CLASS="LITERAL" >|</TT > operator — has the same greediness as the first quantified atom in it that has a greediness attribute. </P ></LI ><LI ><P > An RE consisting of two or more branches connected by the <TT CLASS="LITERAL" >|</TT > operator is always greedy. </P ></LI ></UL ><P> </P ><P > The above rules associate greediness attributes not only with individual quantified atoms, but with branches and entire REs that contain quantified atoms. What that means is that the matching is done in such a way that the branch, or whole RE, matches the longest or shortest possible substring <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >as a whole</I ></SPAN >. Once the length of the entire match is determined, the part of it that matches any particular subexpression is determined on the basis of the greediness attribute of that subexpression, with subexpressions starting earlier in the RE taking priority over ones starting later. </P ><P > An example of what this means: </P><PRE CLASS="SCREEN" >SELECT SUBSTRING('XY1234Z', 'Y*([0-9]{1,3})'); <I CLASS="LINEANNOTATION" >Result: </I ><SAMP CLASS="COMPUTEROUTPUT" >123</SAMP > SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); <I CLASS="LINEANNOTATION" >Result: </I ><SAMP CLASS="COMPUTEROUTPUT" >1</SAMP ></PRE ><P> In the first case, the RE as a whole is greedy because <TT CLASS="LITERAL" >Y*</TT > is greedy. It can match beginning at the <TT CLASS="LITERAL" >Y</TT >, and it matches the longest possible string starting there, i.e., <TT CLASS="LITERAL" >Y123</TT >. The output is the parenthesized part of that, or <TT CLASS="LITERAL" >123</TT >. In the second case, the RE as a whole is non-greedy because <TT CLASS="LITERAL" >Y*?</TT > is non-greedy. It can match beginning at the <TT CLASS="LITERAL" >Y</TT >, and it matches the shortest possible string starting there, i.e., <TT CLASS="LITERAL" >Y1</TT >. The subexpression <TT CLASS="LITERAL" >[0-9]{1,3}</TT > is greedy but it cannot change the decision as to the overall match length; so it is forced to match just <TT CLASS="LITERAL" >1</TT >. </P ><P > In short, when an RE contains both greedy and non-greedy subexpressions, the total match length is either as long as possible or as short as possible, according to the attribute assigned to the whole RE. The attributes assigned to the subexpressions only affect how much of that match they are allowed to <SPAN CLASS="QUOTE" >"eat"</SPAN > relative to each other. </P ><P > The quantifiers <TT CLASS="LITERAL" >{1,1}</TT > and <TT CLASS="LITERAL" >{1,1}?</TT > can be used to force greediness or non-greediness, respectively, on a subexpression or a whole RE. This is useful when you need the whole RE to have a greediness attribute different from what's deduced from its elements. As an example, suppose that we are trying to separate a string containing some digits into the digits and the parts before and after them. We might try to do that like this: </P><PRE CLASS="SCREEN" >SELECT regexp_matches('abc01234xyz', '(.*)(\d+)(.*)'); <I CLASS="LINEANNOTATION" >Result: </I ><SAMP CLASS="COMPUTEROUTPUT" >{abc0123,4,xyz}</SAMP ></PRE ><P> That didn't work: the first <TT CLASS="LITERAL" >.*</TT > is greedy so it <SPAN CLASS="QUOTE" >"eats"</SPAN > as much as it can, leaving the <TT CLASS="LITERAL" >\d+</TT > to match at the last possible place, the last digit. We might try to fix that by making it non-greedy: </P><PRE CLASS="SCREEN" >SELECT regexp_matches('abc01234xyz', '(.*?)(\d+)(.*)'); <I CLASS="LINEANNOTATION" >Result: </I ><SAMP CLASS="COMPUTEROUTPUT" >{abc,0,""}</SAMP ></PRE ><P> That didn't work either, because now the RE as a whole is non-greedy and so it ends the overall match as soon as possible. We can get what we want by forcing the RE as a whole to be greedy: </P><PRE CLASS="SCREEN" >SELECT regexp_matches('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <I CLASS="LINEANNOTATION" >Result: </I ><SAMP CLASS="COMPUTEROUTPUT" >{abc,01234,xyz}</SAMP ></PRE ><P> Controlling the RE's overall greediness separately from its components' greediness allows great flexibility in handling variable-length patterns. </P ><P > When deciding what is a longer or shorter match, match lengths are measured in characters, not collating elements. An empty string is considered longer than no match at all. For example: <TT CLASS="LITERAL" >bb*</TT > matches the three middle characters of <TT CLASS="LITERAL" >abbbc</TT >; <TT CLASS="LITERAL" >(week|wee)(night|knights)</TT > matches all ten characters of <TT CLASS="LITERAL" >weeknights</TT >; when <TT CLASS="LITERAL" >(.*).*</TT > is matched against <TT CLASS="LITERAL" >abc</TT > the parenthesized subexpression matches all three characters; and when <TT CLASS="LITERAL" >(a*)*</TT > is matched against <TT CLASS="LITERAL" >bc</TT > both the whole RE and the parenthesized subexpression match an empty string. </P ><P > If case-independent matching is specified, the effect is much as if all case distinctions had vanished from the alphabet. When an alphabetic that exists in multiple cases appears as an ordinary character outside a bracket expression, it is effectively transformed into a bracket expression containing both cases, e.g., <TT CLASS="LITERAL" >x</TT > becomes <TT CLASS="LITERAL" >[xX]</TT >. When it appears inside a bracket expression, all case counterparts of it are added to the bracket expression, e.g., <TT CLASS="LITERAL" >[x]</TT > becomes <TT CLASS="LITERAL" >[xX]</TT > and <TT CLASS="LITERAL" >[^x]</TT > becomes <TT CLASS="LITERAL" >[^xX]</TT >. </P ><P > If newline-sensitive matching is specified, <TT CLASS="LITERAL" >.</TT > and bracket expressions using <TT CLASS="LITERAL" >^</TT > will never match the newline character (so that matches will never cross newlines unless the RE explicitly arranges it) and <TT CLASS="LITERAL" >^</TT >and <TT CLASS="LITERAL" >$</TT > will match the empty string after and before a newline respectively, in addition to matching at beginning and end of string respectively. But the ARE escapes <TT CLASS="LITERAL" >\A</TT > and <TT CLASS="LITERAL" >\Z</TT > continue to match beginning or end of string <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >only</I ></SPAN >. </P ><P > If partial newline-sensitive matching is specified, this affects <TT CLASS="LITERAL" >.</TT > and bracket expressions as with newline-sensitive matching, but not <TT CLASS="LITERAL" >^</TT > and <TT CLASS="LITERAL" >$</TT >. </P ><P > If inverse partial newline-sensitive matching is specified, this affects <TT CLASS="LITERAL" >^</TT > and <TT CLASS="LITERAL" >$</TT > as with newline-sensitive matching, but not <TT CLASS="LITERAL" >.</TT > and bracket expressions. This isn't very useful but is provided for symmetry. </P ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-LIMITS-COMPATIBILITY" >9.7.3.6. Limits and Compatibility</A ></H3 ><P > No particular limit is imposed on the length of REs in this implementation. However, programs intended to be highly portable should not employ REs longer than 256 bytes, as a POSIX-compliant implementation can refuse to accept such REs. </P ><P > The only feature of AREs that is actually incompatible with POSIX EREs is that <TT CLASS="LITERAL" >\</TT > does not lose its special significance inside bracket expressions. All other ARE features use syntax which is illegal or has undefined or unspecified effects in POSIX EREs; the <TT CLASS="LITERAL" >***</TT > syntax of directors likewise is outside the POSIX syntax for both BREs and EREs. </P ><P > Many of the ARE extensions are borrowed from Perl, but some have been changed to clean them up, and a few Perl extensions are not present. Incompatibilities of note include <TT CLASS="LITERAL" >\b</TT >, <TT CLASS="LITERAL" >\B</TT >, the lack of special treatment for a trailing newline, the addition of complemented bracket expressions to the things affected by newline-sensitive matching, the restrictions on parentheses and back references in lookahead constraints, and the longest/shortest-match (rather than first-match) matching semantics. </P ><P > Two significant incompatibilities exist between AREs and the ERE syntax recognized by pre-7.4 releases of <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >: <P ></P ></P><UL ><LI ><P > In AREs, <TT CLASS="LITERAL" >\</TT > followed by an alphanumeric character is either an escape or an error, while in previous releases, it was just another way of writing the alphanumeric. This should not be much of a problem because there was no reason to write such a sequence in earlier releases. </P ></LI ><LI ><P > In AREs, <TT CLASS="LITERAL" >\</TT > remains a special character within <TT CLASS="LITERAL" >[]</TT >, so a literal <TT CLASS="LITERAL" >\</TT > within a bracket expression must be written <TT CLASS="LITERAL" >\\</TT >. </P ></LI ></UL ><P> </P ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="POSIX-BASIC-REGEXES" >9.7.3.7. Basic Regular Expressions</A ></H3 ><P > BREs differ from EREs in several respects. In BREs, <TT CLASS="LITERAL" >|</TT >, <TT CLASS="LITERAL" >+</TT >, and <TT CLASS="LITERAL" >?</TT > are ordinary characters and there is no equivalent for their functionality. The delimiters for bounds are <TT CLASS="LITERAL" >\{</TT > and <TT CLASS="LITERAL" >\}</TT >, with <TT CLASS="LITERAL" >{</TT > and <TT CLASS="LITERAL" >}</TT > by themselves ordinary characters. The parentheses for nested subexpressions are <TT CLASS="LITERAL" >\(</TT > and <TT CLASS="LITERAL" >\)</TT >, with <TT CLASS="LITERAL" >(</TT > and <TT CLASS="LITERAL" >)</TT > by themselves ordinary characters. <TT CLASS="LITERAL" >^</TT > is an ordinary character except at the beginning of the RE or the beginning of a parenthesized subexpression, <TT CLASS="LITERAL" >$</TT > is an ordinary character except at the end of the RE or the end of a parenthesized subexpression, and <TT CLASS="LITERAL" >*</TT > is an ordinary character if it appears at the beginning of the RE or the beginning of a parenthesized subexpression (after a possible leading <TT CLASS="LITERAL" >^</TT >). Finally, single-digit back references are available, and <TT CLASS="LITERAL" >\<</TT > and <TT CLASS="LITERAL" >\></TT > are synonyms for <TT CLASS="LITERAL" >[[:<:]]</TT > and <TT CLASS="LITERAL" >[[:>:]]</TT > respectively; no other escapes are available in BREs. </P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="functions-bitstring.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="functions-formatting.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Bit String Functions and Operators</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="functions.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Data Type Formatting Functions</TD ></TR ></TABLE ></DIV ></BODY ></HTML >
Submit
FILE
FOLDER
Name
Size
Permission
Action
LEGALNOTICE.html
2681 bytes
0644
acronyms.html
16284 bytes
0644
admin.html
12564 bytes
0644
adminpack.html
7889 bytes
0644
app-clusterdb.html
10602 bytes
0644
app-createdb.html
12856 bytes
0644
app-createlang.html
9907 bytes
0644
app-createuser.html
15640 bytes
0644
app-dropdb.html
9642 bytes
0644
app-droplang.html
9638 bytes
0644
app-dropuser.html
9596 bytes
0644
app-ecpg.html
8718 bytes
0644
app-initdb.html
15405 bytes
0644
app-pg-ctl.html
22459 bytes
0644
app-pg-dumpall.html
20706 bytes
0644
app-pgbasebackup.html
19833 bytes
0644
app-pgconfig.html
11093 bytes
0644
app-pgcontroldata.html
3979 bytes
0644
app-pgdump.html
43964 bytes
0644
app-pgreceivexlog.html
11057 bytes
0644
app-pgresetxlog.html
11566 bytes
0644
app-pgrestore.html
30269 bytes
0644
app-postgres.html
31828 bytes
0644
app-postmaster.html
3005 bytes
0644
app-psql.html
138871 bytes
0644
app-reindexdb.html
11281 bytes
0644
app-vacuumdb.html
12616 bytes
0644
appendixes.html
26329 bytes
0644
applevel-consistency.html
10315 bytes
0644
archive-recovery-settings.html
7338 bytes
0644
arrays.html
28079 bytes
0644
auth-delay.html
3780 bytes
0644
auth-methods.html
36202 bytes
0644
auth-pg-hba-conf.html
29759 bytes
0644
auth-username-maps.html
8597 bytes
0644
auto-explain.html
9887 bytes
0644
backup-dump.html
15927 bytes
0644
backup-file.html
7996 bytes
0644
backup.html
4485 bytes
0644
biblio.html
11549 bytes
0644
bki-commands.html
9646 bytes
0644
bki-example.html
3049 bytes
0644
bki-format.html
3463 bytes
0644
bki-structure.html
4320 bytes
0644
bki.html
4330 bytes
0644
bookindex.html
243165 bytes
0644
btree-gin.html
4600 bytes
0644
btree-gist.html
6884 bytes
0644
bug-reporting.html
18646 bytes
0644
catalog-pg-aggregate.html
5502 bytes
0644
catalog-pg-am.html
10547 bytes
0644
catalog-pg-amop.html
7593 bytes
0644
catalog-pg-amproc.html
4885 bytes
0644
catalog-pg-attrdef.html
4364 bytes
0644
catalog-pg-attribute.html
10287 bytes
0644
catalog-pg-auth-members.html
4255 bytes
0644
catalog-pg-authid.html
6815 bytes
0644
catalog-pg-cast.html
6955 bytes
0644
catalog-pg-class.html
12661 bytes
0644
catalog-pg-collation.html
5897 bytes
0644
catalog-pg-constraint.html
11579 bytes
0644
catalog-pg-conversion.html
4430 bytes
0644
catalog-pg-database.html
7027 bytes
0644
catalog-pg-db-role-setting.html
4068 bytes
0644
catalog-pg-default-acl.html
5267 bytes
0644
catalog-pg-depend.html
8635 bytes
0644
catalog-pg-description.html
4478 bytes
0644
catalog-pg-enum.html
4716 bytes
0644
catalog-pg-extension.html
5282 bytes
0644
catalog-pg-foreign-data-wrapper.html
4945 bytes
0644
catalog-pg-foreign-server.html
4688 bytes
0644
catalog-pg-foreign-table.html
4036 bytes
0644
catalog-pg-index.html
8868 bytes
0644
catalog-pg-inherits.html
3888 bytes
0644
catalog-pg-language.html
5952 bytes
0644
catalog-pg-largeobject-metadata.html
3630 bytes
0644
catalog-pg-largeobject.html
5154 bytes
0644
catalog-pg-namespace.html
3751 bytes
0644
catalog-pg-opclass.html
5863 bytes
0644
catalog-pg-operator.html
6645 bytes
0644
catalog-pg-opfamily.html
4811 bytes
0644
catalog-pg-pltemplate.html
5364 bytes
0644
catalog-pg-proc.html
13403 bytes
0644
catalog-pg-range.html
5182 bytes
0644
catalog-pg-rewrite.html
5391 bytes
0644
catalog-pg-seclabel.html
4515 bytes
0644
catalog-pg-shdepend.html
7043 bytes
0644
catalog-pg-shdescription.html
4247 bytes
0644
catalog-pg-shseclabel.html
4404 bytes
0644
catalog-pg-statistic.html
9538 bytes
0644
catalog-pg-tablespace.html
4158 bytes
0644
catalog-pg-trigger.html
8287 bytes
0644
catalog-pg-ts-config-map.html
4193 bytes
0644
catalog-pg-ts-config.html
4481 bytes
0644
catalog-pg-ts-dict.html
4716 bytes
0644
catalog-pg-ts-parser.html
5082 bytes
0644
catalog-pg-ts-template.html
4258 bytes
0644
catalog-pg-type.html
19905 bytes
0644
catalog-pg-user-mapping.html
3847 bytes
0644
catalogs-overview.html
10431 bytes
0644
catalogs.html
10387 bytes
0644
charset.html
4162 bytes
0644
chkpass.html
4391 bytes
0644
citext.html
11148 bytes
0644
client-authentication-problems.html
4224 bytes
0644
client-authentication.html
5914 bytes
0644
client-interfaces.html
13717 bytes
0644
collation.html
14222 bytes
0644
config-setting.html
11146 bytes
0644
connect-estab.html
4315 bytes
0644
continuous-archiving.html
49830 bytes
0644
contrib-dblink-build-sql-delete.html
5451 bytes
0644
contrib-dblink-build-sql-insert.html
6052 bytes
0644
contrib-dblink-build-sql-update.html
6281 bytes
0644
contrib-dblink-cancel-query.html
3820 bytes
0644
contrib-dblink-close.html
4650 bytes
0644
contrib-dblink-connect-u.html
4482 bytes
0644
contrib-dblink-connect.html
7325 bytes
0644
contrib-dblink-disconnect.html
3718 bytes
0644
contrib-dblink-error-message.html
3508 bytes
0644
contrib-dblink-exec.html
5466 bytes
0644
contrib-dblink-fetch.html
5979 bytes
0644
contrib-dblink-function.html
8630 bytes
0644
contrib-dblink-get-connections.html
3206 bytes
0644
contrib-dblink-get-notify.html
4168 bytes
0644
contrib-dblink-get-pkey.html
4498 bytes
0644
contrib-dblink-get-result.html
6959 bytes
0644
contrib-dblink-is-busy.html
3490 bytes
0644
contrib-dblink-open.html
5464 bytes
0644
contrib-dblink-send-query.html
4170 bytes
0644
contrib-prog-client.html
3434 bytes
0644
contrib-prog-server.html
3837 bytes
0644
contrib-prog.html
3320 bytes
0644
contrib-spi.html
11236 bytes
0644
contrib.html
8904 bytes
0644
creating-cluster.html
12465 bytes
0644
cube.html
15941 bytes
0644
database-roles.html
6092 bytes
0644
datatype-binary.html
12893 bytes
0644
datatype-bit.html
5096 bytes
0644
datatype-boolean.html
5267 bytes
0644
datatype-character.html
11893 bytes
0644
datatype-datetime.html
50763 bytes
0644
datatype-enum.html
6433 bytes
0644
datatype-geometric.html
12503 bytes
0644
datatype-json.html
3439 bytes
0644
datatype-money.html
5482 bytes
0644
datatype-net-types.html
10423 bytes
0644
datatype-numeric.html
22353 bytes
0644
datatype-oid.html
9686 bytes
0644
datatype-pseudo.html
7285 bytes
0644
datatype-textsearch.html
10033 bytes
0644
datatype-uuid.html
4560 bytes
0644
datatype-xml.html
11334 bytes
0644
datatype.html
16609 bytes
0644
datetime-appendix.html
3525 bytes
0644
datetime-config-files.html
8980 bytes
0644
datetime-input-rules.html
6763 bytes
0644
datetime-keywords.html
5096 bytes
0644
datetime-units-history.html
7634 bytes
0644
dblink.html
5322 bytes
0644
ddl-alter.html
10498 bytes
0644
ddl-basics.html
7816 bytes
0644
ddl-constraints.html
22790 bytes
0644
ddl-default.html
4540 bytes
0644
ddl-depend.html
6498 bytes
0644
ddl-foreign-data.html
4485 bytes
0644
ddl-inherit.html
15308 bytes
0644
ddl-others.html
3080 bytes
0644
ddl-partitioning.html
27763 bytes
0644
ddl-priv.html
6066 bytes
0644
ddl-schemas.html
18046 bytes
0644
ddl-system-columns.html
8049 bytes
0644
ddl.html
6382 bytes
0644
dict-int.html
4793 bytes
0644
dict-xsyn.html
6481 bytes
0644
different-replication-solutions.html
14793 bytes
0644
disk-full.html
3517 bytes
0644
disk-usage.html
5661 bytes
0644
diskusage.html
2668 bytes
0644
dml-delete.html
3565 bytes
0644
dml-insert.html
5801 bytes
0644
dml-returning.html
5104 bytes
0644
dml-update.html
5556 bytes
0644
dml.html
2944 bytes
0644
docguide-authoring.html
6757 bytes
0644
docguide-build.html
15280 bytes
0644
docguide-docbook.html
3853 bytes
0644
docguide-style.html
7429 bytes
0644
docguide-toolsets.html
20683 bytes
0644
docguide.html
3624 bytes
0644
dummy-seclabel.html
4358 bytes
0644
dynamic-trace.html
27234 bytes
0644
earthdistance.html
8806 bytes
0644
ecpg-commands.html
9527 bytes
0644
ecpg-concept.html
4979 bytes
0644
ecpg-connect.html
10826 bytes
0644
ecpg-cpp.html
9624 bytes
0644
ecpg-descriptors.html
34909 bytes
0644
ecpg-develop.html
7964 bytes
0644
ecpg-dynamic.html
6515 bytes
0644
ecpg-errors.html
25737 bytes
0644
ecpg-informix-compat.html
52760 bytes
0644
ecpg-library.html
5798 bytes
0644
ecpg-lo.html
5527 bytes
0644
ecpg-pgtypes.html
54457 bytes
0644
ecpg-preproc.html
8985 bytes
0644
ecpg-process.html
5386 bytes
0644
ecpg-sql-allocate-descriptor.html
3983 bytes
0644
ecpg-sql-commands.html
4698 bytes
0644
ecpg-sql-connect.html
9375 bytes
0644
ecpg-sql-deallocate-descriptor.html
3773 bytes
0644
ecpg-sql-declare.html
5397 bytes
0644
ecpg-sql-describe.html
4595 bytes
0644
ecpg-sql-disconnect.html
4733 bytes
0644
ecpg-sql-execute-immediate.html
3877 bytes
0644
ecpg-sql-get-descriptor.html
7709 bytes
0644
ecpg-sql-open.html
4642 bytes
0644
ecpg-sql-prepare.html
4177 bytes
0644
ecpg-sql-set-autocommit.html
3333 bytes
0644
ecpg-sql-set-connection.html
3929 bytes
0644
ecpg-sql-set-descriptor.html
5505 bytes
0644
ecpg-sql-type.html
5026 bytes
0644
ecpg-sql-var.html
3539 bytes
0644
ecpg-sql-whenever.html
4686 bytes
0644
ecpg-variables.html
40283 bytes
0644
ecpg.html
10344 bytes
0644
encryption-options.html
7495 bytes
0644
errcodes-appendix.html
36965 bytes
0644
error-message-reporting.html
14124 bytes
0644
error-style-guide.html
16769 bytes
0644
event-log-registration.html
4188 bytes
0644
executor.html
6612 bytes
0644
explicit-joins.html
11019 bytes
0644
explicit-locking.html
25073 bytes
0644
extend-extensions.html
32430 bytes
0644
extend-how.html
4552 bytes
0644
extend-pgxs.html
11761 bytes
0644
extend-type-system.html
10111 bytes
0644
extend.html
9982 bytes
0644
external-admin-tools.html
2722 bytes
0644
external-extensions.html
3263 bytes
0644
external-interfaces.html
5513 bytes
0644
external-pl.html
4670 bytes
0644
external-projects.html
3004 bytes
0644
fdw-callbacks.html
12905 bytes
0644
fdw-functions.html
4496 bytes
0644
fdw-helpers.html
5988 bytes
0644
fdw-planning.html
9845 bytes
0644
fdwhandler.html
3990 bytes
0644
features-sql-standard.html
39105 bytes
0644
features.html
7566 bytes
0644
file-fdw.html
7709 bytes
0644
functions-admin.html
50395 bytes
0644
functions-aggregate.html
21814 bytes
0644
functions-array.html
13521 bytes
0644
functions-binarystring.html
12588 bytes
0644
functions-bitstring.html
6786 bytes
0644
functions-comparison.html
10638 bytes
0644
functions-comparisons.html
13531 bytes
0644
functions-conditional.html
11007 bytes
0644
functions-datetime.html
48303 bytes
0644
functions-enum.html
5491 bytes
0644
functions-formatting.html
35401 bytes
0644
functions-geometry.html
20347 bytes
0644
functions-info.html
58658 bytes
0644
functions-json.html
3814 bytes
0644
functions-logical.html
4665 bytes
0644
functions-matching.html
75728 bytes
0644
functions-math.html
20401 bytes
0644
functions-net.html
13502 bytes
0644
functions-range.html
10857 bytes
0644
functions-sequence.html
12925 bytes
0644
functions-srf.html
8840 bytes
0644
functions-string.html
59052 bytes
0644
functions-subquery.html
16381 bytes
0644
functions-textsearch.html
20488 bytes
0644
functions-trigger.html
4548 bytes
0644
functions-window.html
12085 bytes
0644
functions-xml.html
32169 bytes
0644
functions.html
9939 bytes
0644
fuzzystrmatch.html
8061 bytes
0644
geqo-biblio.html
3459 bytes
0644
geqo-intro.html
4415 bytes
0644
geqo-intro2.html
5627 bytes
0644
geqo-pg-intro.html
8785 bytes
0644
geqo.html
3616 bytes
0644
gin-examples.html
3322 bytes
0644
gin-extensibility.html
14402 bytes
0644
gin-implementation.html
6564 bytes
0644
gin-intro.html
4662 bytes
0644
gin-limit.html
2817 bytes
0644
gin-tips.html
5713 bytes
0644
gin.html
2929 bytes
0644
gist-examples.html
3752 bytes
0644
gist-extensibility.html
24354 bytes
0644
gist-implementation.html
4101 bytes
0644
gist-intro.html
3616 bytes
0644
gist.html
2679 bytes
0644
git.html
4564 bytes
0644
high-availability.html
7698 bytes
0644
history.html
11918 bytes
0644
hot-standby.html
36045 bytes
0644
hstore.html
22629 bytes
0644
index-catalog.html
7996 bytes
0644
index-cost-estimation.html
9991 bytes
0644
index-functions.html
19114 bytes
0644
index-locking.html
8049 bytes
0644
index-scanning.html
10707 bytes
0644
index-unique-checks.html
9192 bytes
0644
index.html
8071 bytes
0644
indexam.html
5247 bytes
0644
indexes-bitmap-scans.html
6580 bytes
0644
indexes-collations.html
3640 bytes
0644
indexes-examine.html
7161 bytes
0644
indexes-expressional.html
4813 bytes
0644
indexes-intro.html
6313 bytes
0644
indexes-multicolumn.html
6298 bytes
0644
indexes-opclass.html
7336 bytes
0644
indexes-ordering.html
6480 bytes
0644
indexes-partial.html
11812 bytes
0644
indexes-types.html
10233 bytes
0644
indexes-unique.html
4002 bytes
0644
indexes.html
3619 bytes
0644
information-schema.html
11177 bytes
0644
infoschema-administrable-role-authorizations.html
3751 bytes
0644
infoschema-applicable-roles.html
3970 bytes
0644
infoschema-attributes.html
12807 bytes
0644
infoschema-character-sets.html
7050 bytes
0644
infoschema-check-constraint-routine-usage.html
4349 bytes
0644
infoschema-check-constraints.html
3876 bytes
0644
infoschema-collation-character-set-applicab.html
4425 bytes
0644
infoschema-collations.html
3885 bytes
0644
infoschema-column-domain-usage.html
4322 bytes
0644
infoschema-column-options.html
4109 bytes
0644
infoschema-column-privileges.html
5029 bytes
0644
infoschema-column-udt-usage.html
4583 bytes
0644
infoschema-columns.html
17625 bytes
0644
infoschema-constraint-column-usage.html
4873 bytes
0644
infoschema-constraint-table-usage.html
4774 bytes
0644
infoschema-data-type-privileges.html
5089 bytes
0644
infoschema-datatypes.html
4229 bytes
0644
infoschema-domain-constraints.html
4664 bytes
0644
infoschema-domain-udt-usage.html
4171 bytes
0644
infoschema-domains.html
11367 bytes
0644
infoschema-element-types.html
11374 bytes
0644
infoschema-enabled-roles.html
3780 bytes
0644
infoschema-foreign-data-wrapper-options.html
3910 bytes
0644
infoschema-foreign-data-wrappers.html
4227 bytes
0644
infoschema-foreign-server-options.html
3853 bytes
0644
infoschema-foreign-servers.html
4571 bytes
0644
infoschema-foreign-table-options.html
3974 bytes
0644
infoschema-foreign-tables.html
4072 bytes
0644
infoschema-information-schema-catalog-name.html
3357 bytes
0644
infoschema-key-column-usage.html
5185 bytes
0644
infoschema-parameters.html
10799 bytes
0644
infoschema-referential-constraints.html
5664 bytes
0644
infoschema-role-column-grants.html
5017 bytes
0644
infoschema-role-routine-grants.html
5360 bytes
0644
infoschema-role-table-grants.html
5427 bytes
0644
infoschema-role-udt-grants.html
4781 bytes
0644
infoschema-role-usage-grants.html
5010 bytes
0644
infoschema-routine-privileges.html
5032 bytes
0644
infoschema-routines.html
23052 bytes
0644
infoschema-schema.html
3180 bytes
0644
infoschema-schemata.html
4248 bytes
0644
infoschema-sequences.html
6111 bytes
0644
infoschema-sql-features.html
4708 bytes
0644
infoschema-sql-implementation-info.html
4503 bytes
0644
infoschema-sql-languages.html
5094 bytes
0644
infoschema-sql-packages.html
4178 bytes
0644
infoschema-sql-parts.html
4080 bytes
0644
infoschema-sql-sizing-profiles.html
4177 bytes
0644
infoschema-sql-sizing.html
4101 bytes
0644
infoschema-table-constraints.html
4914 bytes
0644
infoschema-table-privileges.html
5097 bytes
0644
infoschema-tables.html
5957 bytes
0644
infoschema-triggered-update-columns.html
4554 bytes
0644
infoschema-triggers.html
9447 bytes
0644
infoschema-udt-privileges.html
4509 bytes
0644
infoschema-usage-privileges.html
5512 bytes
0644
infoschema-user-defined-types.html
9753 bytes
0644
infoschema-user-mapping-options.html
4449 bytes
0644
infoschema-user-mappings.html
3833 bytes
0644
infoschema-view-column-usage.html
4728 bytes
0644
infoschema-view-routine-usage.html
4368 bytes
0644
infoschema-view-table-usage.html
4389 bytes
0644
infoschema-views.html
5529 bytes
0644
install-getsource.html
3574 bytes
0644
install-post.html
8076 bytes
0644
install-procedure.html
46527 bytes
0644
install-requirements.html
14481 bytes
0644
install-short.html
2870 bytes
0644
install-windows-full.html
19274 bytes
0644
install-windows-libpq.html
6283 bytes
0644
install-windows.html
6620 bytes
0644
installation-platform-notes.html
39380 bytes
0644
installation.html
4160 bytes
0644
intagg.html
6254 bytes
0644
intarray.html
13757 bytes
0644
internals.html
15638 bytes
0644
intro-whatis.html
4011 bytes
0644
isn.html
13356 bytes
0644
kernel-resources.html
37822 bytes
0644
largeobjects.html
4675 bytes
0644
libpq-async.html
21020 bytes
0644
libpq-build.html
6369 bytes
0644
libpq-cancel.html
6777 bytes
0644
libpq-connect.html
51248 bytes
0644
libpq-control.html
6280 bytes
0644
libpq-copy.html
22442 bytes
0644
libpq-envars.html
9820 bytes
0644
libpq-events.html
23093 bytes
0644
libpq-example.html
16024 bytes
0644
libpq-exec.html
64877 bytes
0644
libpq-fastpath.html
6124 bytes
0644
libpq-ldap.html
5506 bytes
0644
libpq-misc.html
13815 bytes
0644
libpq-notice-processing.html
6284 bytes
0644
libpq-notify.html
6715 bytes
0644
libpq-pgpass.html
4861 bytes
0644
libpq-pgservice.html
3905 bytes
0644
libpq-single-row-mode.html
6353 bytes
0644
libpq-ssl.html
19972 bytes
0644
libpq-status.html
17695 bytes
0644
libpq-threading.html
5544 bytes
0644
libpq.html
7918 bytes
0644
lo-examplesect.html
8696 bytes
0644
lo-funcs.html
4640 bytes
0644
lo-implementation.html
3353 bytes
0644
lo-interfaces.html
15155 bytes
0644
lo-intro.html
3206 bytes
0644
lo.html
6627 bytes
0644
locale.html
13691 bytes
0644
locking-indexes.html
4350 bytes
0644
log-shipping-alternative.html
11057 bytes
0644
logfile-maintenance.html
7143 bytes
0644
ltree.html
27295 bytes
0644
maintenance.html
5538 bytes
0644
manage-ag-config.html
3746 bytes
0644
manage-ag-createdb.html
6310 bytes
0644
manage-ag-dropdb.html
3605 bytes
0644
manage-ag-overview.html
5144 bytes
0644
manage-ag-tablespaces.html
9250 bytes
0644
manage-ag-templatedbs.html
8162 bytes
0644
managing-databases.html
3273 bytes
0644
monitoring-locks.html
3673 bytes
0644
monitoring-ps.html
6782 bytes
0644
monitoring-stats.html
58063 bytes
0644
monitoring.html
4458 bytes
0644
multibyte.html
31965 bytes
0644
mvcc-caveats.html
4077 bytes
0644
mvcc-intro.html
4552 bytes
0644
mvcc.html
4302 bytes
0644
nls-programmer.html
10078 bytes
0644
nls-translator.html
14522 bytes
0644
nls.html
3134 bytes
0644
non-durability.html
4484 bytes
0644
notation.html
4415 bytes
0644
oid2name.html
11962 bytes
0644
overview.html
4093 bytes
0644
pageinspect.html
8117 bytes
0644
parser-stage.html
8117 bytes
0644
passwordcheck.html
4788 bytes
0644
performance-tips.html
4501 bytes
0644
perm-functions.html
3338 bytes
0644
pgarchivecleanup.html
8999 bytes
0644
pgbench.html
30833 bytes
0644
pgbuffercache.html
7715 bytes
0644
pgcrypto.html
38804 bytes
0644
pgfreespacemap.html
5230 bytes
0644
pgrowlocks.html
6078 bytes
0644
pgstandby.html
15204 bytes
0644
pgstatstatements.html
16068 bytes
0644
pgstattuple.html
9449 bytes
0644
pgtestfsync.html
5254 bytes
0644
pgtesttiming.html
12476 bytes
0644
pgtrgm.html
12333 bytes
0644
pgupgrade.html
24737 bytes
0644
planner-optimizer.html
9396 bytes
0644
planner-stats-details.html
3276 bytes
0644
planner-stats-security.html
5556 bytes
0644
planner-stats.html
9058 bytes
0644
plhandler.html
13748 bytes
0644
plperl-builtins.html
18276 bytes
0644
plperl-data.html
2878 bytes
0644
plperl-funcs.html
13369 bytes
0644
plperl-global.html
5067 bytes
0644
plperl-triggers.html
6446 bytes
0644
plperl-trusted.html
6712 bytes
0644
plperl-under-the-hood.html
8991 bytes
0644
plperl.html
4930 bytes
0644
plpgsql-control-structures.html
46183 bytes
0644
plpgsql-cursors.html
25586 bytes
0644
plpgsql-declarations.html
21746 bytes
0644
plpgsql-development-tips.html
9511 bytes
0644
plpgsql-errors-and-messages.html
10094 bytes
0644
plpgsql-expressions.html
4662 bytes
0644
plpgsql-implementation.html
18043 bytes
0644
plpgsql-overview.html
9032 bytes
0644
plpgsql-porting.html
27094 bytes
0644
plpgsql-statements.html
32221 bytes
0644
plpgsql-structure.html
8329 bytes
0644
plpgsql-trigger.html
22322 bytes
0644
plpgsql.html
6965 bytes
0644
plpython-data.html
14648 bytes
0644
plpython-database.html
15413 bytes
0644
plpython-do.html
2771 bytes
0644
plpython-envar.html
3885 bytes
0644
plpython-funcs.html
5478 bytes
0644
plpython-python23.html
7207 bytes
0644
plpython-sharing.html
3032 bytes
0644
plpython-subtransaction.html
7888 bytes
0644
plpython-trigger.html
5069 bytes
0644
plpython-util.html
5104 bytes
0644
plpython.html
6067 bytes
0644
pltcl-data.html
2906 bytes
0644
pltcl-dbaccess.html
13902 bytes
0644
pltcl-functions.html
6177 bytes
0644
pltcl-global.html
5066 bytes
0644
pltcl-overview.html
5288 bytes
0644
pltcl-procnames.html
3222 bytes
0644
pltcl-trigger.html
9452 bytes
0644
pltcl-unknown.html
5075 bytes
0644
pltcl.html
3400 bytes
0644
populate.html
17114 bytes
0644
postgres-user.html
3314 bytes
0644
preface.html
5070 bytes
0644
preventing-server-spoofing.html
4604 bytes
0644
protocol-changes.html
6650 bytes
0644
protocol-error-fields.html
6131 bytes
0644
protocol-flow.html
46202 bytes
0644
protocol-message-formats.html
40844 bytes
0644
protocol-message-types.html
4933 bytes
0644
protocol-overview.html
9670 bytes
0644
protocol-replication.html
14666 bytes
0644
protocol.html
5652 bytes
0644
queries-limit.html
5335 bytes
0644
queries-order.html
7369 bytes
0644
queries-overview.html
5068 bytes
0644
queries-select-lists.html
9308 bytes
0644
queries-table-expressions.html
39874 bytes
0644
queries-union.html
5114 bytes
0644
queries-values.html
4930 bytes
0644
queries-with.html
20880 bytes
0644
queries.html
4418 bytes
0644
query-path.html
5470 bytes
0644
querytree.html
11136 bytes
0644
rangetypes.html
22735 bytes
0644
recovery-config.html
3550 bytes
0644
recovery-target-settings.html
7762 bytes
0644
reference-client.html
6102 bytes
0644
reference-server.html
3964 bytes
0644
reference.html
23162 bytes
0644
regress-coverage.html
3325 bytes
0644
regress-evaluation.html
12487 bytes
0644
regress-run.html
13710 bytes
0644
regress-variant.html
7177 bytes
0644
regress.html
4277 bytes
0644
release-0-01.html
2555 bytes
0644
release-0-02.html
4292 bytes
0644
release-0-03.html
7798 bytes
0644
release-1-0.html
4229 bytes
0644
release-1-01.html
9346 bytes
0644
release-1-02.html
6489 bytes
0644
release-1-09.html
2525 bytes
0644
release-6-0.html
7920 bytes
0644
release-6-1-1.html
3719 bytes
0644
release-6-1.html
9025 bytes
0644
release-6-2-1.html
4405 bytes
0644
release-6-2.html
8883 bytes
0644
release-6-3-1.html
4444 bytes
0644
release-6-3-2.html
4157 bytes
0644
release-6-3.html
16311 bytes
0644
release-6-4-1.html
4061 bytes
0644
release-6-4-2.html
2908 bytes
0644
release-6-4.html
14732 bytes
0644
release-6-5-1.html
3842 bytes
0644
release-6-5-2.html
4102 bytes
0644
release-6-5-3.html
3053 bytes
0644
release-6-5.html
17387 bytes
0644
release-7-0-1.html
3920 bytes
0644
release-7-0-2.html
2887 bytes
0644
release-7-0-3.html
4656 bytes
0644
release-7-0.html
23104 bytes
0644
release-7-1-1.html
3262 bytes
0644
release-7-1-2.html
2975 bytes
0644
release-7-1-3.html
3139 bytes
0644
release-7-1.html
13017 bytes
0644
release-7-2-1.html
4011 bytes
0644
release-7-2-2.html
3793 bytes
0644
release-7-2-3.html
3364 bytes
0644
release-7-2-4.html
3587 bytes
0644
release-7-2-5.html
3746 bytes
0644
release-7-2-6.html
3624 bytes
0644
release-7-2-7.html
3726 bytes
0644
release-7-2-8.html
3948 bytes
0644
release-7-2.html
27098 bytes
0644
release-7-3-1.html
4168 bytes
0644
release-7-3-10.html
7493 bytes
0644
release-7-3-11.html
4111 bytes
0644
release-7-3-12.html
3527 bytes
0644
release-7-3-13.html
4618 bytes
0644
release-7-3-14.html
3931 bytes
0644
release-7-3-15.html
6315 bytes
0644
release-7-3-16.html
3424 bytes
0644
release-7-3-17.html
3550 bytes
0644
release-7-3-18.html
3647 bytes
0644
release-7-3-19.html
3686 bytes
0644
release-7-3-2.html
5205 bytes
0644
release-7-3-20.html
3524 bytes
0644
release-7-3-21.html
6216 bytes
0644
release-7-3-3.html
10290 bytes
0644
release-7-3-4.html
3502 bytes
0644
release-7-3-5.html
4493 bytes
0644
release-7-3-6.html
4428 bytes
0644
release-7-3-7.html
3352 bytes
0644
release-7-3-8.html
3571 bytes
0644
release-7-3-9.html
4079 bytes
0644
release-7-3.html
33053 bytes
0644
release-7-4-1.html
7116 bytes
0644
release-7-4-10.html
3806 bytes
0644
release-7-4-11.html
4857 bytes
0644
release-7-4-12.html
4221 bytes
0644
release-7-4-13.html
6961 bytes
0644
release-7-4-14.html
3673 bytes
0644
release-7-4-15.html
4270 bytes
0644
release-7-4-16.html
3972 bytes
0644
release-7-4-17.html
4013 bytes
0644
release-7-4-18.html
3927 bytes
0644
release-7-4-19.html
7242 bytes
0644
release-7-4-2.html
8260 bytes
0644
release-7-4-20.html
6605 bytes
0644
release-7-4-21.html
3922 bytes
0644
release-7-4-22.html
4071 bytes
0644
release-7-4-23.html
4423 bytes
0644
release-7-4-24.html
4289 bytes
0644
release-7-4-25.html
4506 bytes
0644
release-7-4-26.html
5455 bytes
0644
release-7-4-27.html
5164 bytes
0644
release-7-4-28.html
5629 bytes
0644
release-7-4-29.html
6960 bytes
0644
release-7-4-3.html
4615 bytes
0644
release-7-4-30.html
6211 bytes
0644
release-7-4-4.html
4085 bytes
0644
release-7-4-5.html
3194 bytes
0644
release-7-4-6.html
4731 bytes
0644
release-7-4-7.html
4274 bytes
0644
release-7-4-8.html
10156 bytes
0644
release-7-4-9.html
5118 bytes
0644
release-7-4.html
57378 bytes
0644
release-8-0-1.html
4744 bytes
0644
release-8-0-10.html
4751 bytes
0644
release-8-0-11.html
3969 bytes
0644
release-8-0-12.html
3134 bytes
0644
release-8-0-13.html
4118 bytes
0644
release-8-0-14.html
4518 bytes
0644
release-8-0-15.html
9101 bytes
0644
release-8-0-16.html
8946 bytes
0644
release-8-0-17.html
3920 bytes
0644
release-8-0-18.html
5579 bytes
0644
release-8-0-19.html
4976 bytes
0644
release-8-0-2.html
9566 bytes
0644
release-8-0-20.html
4312 bytes
0644
release-8-0-21.html
4504 bytes
0644
release-8-0-22.html
6440 bytes
0644
release-8-0-23.html
6023 bytes
0644
release-8-0-24.html
7002 bytes
0644
release-8-0-25.html
7427 bytes
0644
release-8-0-26.html
8026 bytes
0644
release-8-0-3.html
7425 bytes
0644
release-8-0-4.html
6680 bytes
0644
release-8-0-5.html
4816 bytes
0644
release-8-0-6.html
5694 bytes
0644
release-8-0-7.html
5909 bytes
0644
release-8-0-8.html
7225 bytes
0644
release-8-0-9.html
4306 bytes
0644
release-8-0.html
66818 bytes
0644
release-8-1-1.html
5459 bytes
0644
release-8-1-10.html
4781 bytes
0644
release-8-1-11.html
9946 bytes
0644
release-8-1-12.html
9341 bytes
0644
release-8-1-13.html
4292 bytes
0644
release-8-1-14.html
6901 bytes
0644
release-8-1-15.html
6274 bytes
0644
release-8-1-16.html
5278 bytes
0644
release-8-1-17.html
6035 bytes
0644
release-8-1-18.html
6442 bytes
0644
release-8-1-19.html
6612 bytes
0644
release-8-1-2.html
6335 bytes
0644
release-8-1-20.html
7298 bytes
0644
release-8-1-21.html
7213 bytes
0644
release-8-1-22.html
8324 bytes
0644
release-8-1-23.html
7933 bytes
0644
release-8-1-3.html
7026 bytes
0644
release-8-1-4.html
8873 bytes
0644
release-8-1-5.html
5479 bytes
0644
release-8-1-6.html
5337 bytes
0644
release-8-1-7.html
4558 bytes
0644
release-8-1-8.html
3116 bytes
0644
release-8-1-9.html
4388 bytes
0644
release-8-1.html
62113 bytes
0644
release-8-2-1.html
5065 bytes
0644
release-8-2-10.html
8180 bytes
0644
release-8-2-11.html
7147 bytes
0644
release-8-2-12.html
6748 bytes
0644
release-8-2-13.html
7348 bytes
0644
release-8-2-14.html
7876 bytes
0644
release-8-2-15.html
8155 bytes
0644
release-8-2-16.html
9293 bytes
0644
release-8-2-17.html
8214 bytes
0644
release-8-2-18.html
10277 bytes
0644
release-8-2-19.html
8589 bytes
0644
release-8-2-2.html
5802 bytes
0644
release-8-2-20.html
6244 bytes
0644
release-8-2-21.html
5593 bytes
0644
release-8-2-22.html
9617 bytes
0644
release-8-2-23.html
9559 bytes
0644
release-8-2-3.html
3095 bytes
0644
release-8-2-4.html
5428 bytes
0644
release-8-2-5.html
5995 bytes
0644
release-8-2-6.html
10551 bytes
0644
release-8-2-7.html
9311 bytes
0644
release-8-2-8.html
7521 bytes
0644
release-8-2-9.html
4281 bytes
0644
release-8-2.html
69398 bytes
0644
release-8-3-1.html
10585 bytes
0644
release-8-3-10.html
10725 bytes
0644
release-8-3-11.html
8963 bytes
0644
release-8-3-12.html
12119 bytes
0644
release-8-3-13.html
9506 bytes
0644
release-8-3-14.html
6242 bytes
0644
release-8-3-15.html
6381 bytes
0644
release-8-3-16.html
11015 bytes
0644
release-8-3-17.html
10590 bytes
0644
release-8-3-18.html
11265 bytes
0644
release-8-3-19.html
8466 bytes
0644
release-8-3-2.html
12203 bytes
0644
release-8-3-20.html
9251 bytes
0644
release-8-3-21.html
5034 bytes
0644
release-8-3-22.html
10585 bytes
0644
release-8-3-23.html
6284 bytes
0644
release-8-3-3.html
4275 bytes
0644
release-8-3-4.html
11273 bytes
0644
release-8-3-5.html
8689 bytes
0644
release-8-3-6.html
9197 bytes
0644
release-8-3-7.html
9729 bytes
0644
release-8-3-8.html
9260 bytes
0644
release-8-3-9.html
10206 bytes
0644
release-8-3.html
69773 bytes
0644
release-8-4-1.html
9563 bytes
0644
release-8-4-10.html
11932 bytes
0644
release-8-4-11.html
13787 bytes
0644
release-8-4-12.html
9987 bytes
0644
release-8-4-13.html
9714 bytes
0644
release-8-4-14.html
5117 bytes
0644
release-8-4-15.html
10626 bytes
0644
release-8-4-16.html
7329 bytes
0644
release-8-4-17.html
9572 bytes
0644
release-8-4-18.html
7048 bytes
0644
release-8-4-19.html
7780 bytes
0644
release-8-4-2.html
15697 bytes
0644
release-8-4-20.html
16258 bytes
0644
release-8-4-21.html
5450 bytes
0644
release-8-4-22.html
11306 bytes
0644
release-8-4-3.html
13928 bytes
0644
release-8-4-4.html
10736 bytes
0644
release-8-4-5.html
15933 bytes
0644
release-8-4-6.html
10430 bytes
0644
release-8-4-7.html
6220 bytes
0644
release-8-4-8.html
8850 bytes
0644
release-8-4-9.html
14528 bytes
0644
release-8-4.html
87976 bytes
0644
release-9-0-1.html
5946 bytes
0644
release-9-0-10.html
5693 bytes
0644
release-9-0-11.html
12666 bytes
0644
release-9-0-12.html
8824 bytes
0644
release-9-0-13.html
11671 bytes
0644
release-9-0-14.html
8759 bytes
0644
release-9-0-15.html
9147 bytes
0644
release-9-0-16.html
17408 bytes
0644
release-9-0-17.html
6335 bytes
0644
release-9-0-18.html
11879 bytes
0644
release-9-0-19.html
26610 bytes
0644
release-9-0-2.html
13636 bytes
0644
release-9-0-20.html
15836 bytes
0644
release-9-0-21.html
5166 bytes
0644
release-9-0-22.html
4321 bytes
0644
release-9-0-23.html
16158 bytes
0644
release-9-0-3.html
7256 bytes
0644
release-9-0-4.html
11345 bytes
0644
release-9-0-5.html
17915 bytes
0644
release-9-0-6.html
13426 bytes
0644
release-9-0-7.html
18091 bytes
0644
release-9-0-8.html
10993 bytes
0644
release-9-0-9.html
11743 bytes
0644
release-9-0.html
96127 bytes
0644
release-9-1-1.html
3670 bytes
0644
release-9-1-10.html
10352 bytes
0644
release-9-1-11.html
9584 bytes
0644
release-9-1-12.html
18554 bytes
0644
release-9-1-13.html
6685 bytes
0644
release-9-1-14.html
13036 bytes
0644
release-9-1-15.html
28969 bytes
0644
release-9-1-16.html
19119 bytes
0644
release-9-1-17.html
4947 bytes
0644
release-9-1-18.html
4102 bytes
0644
release-9-1-19.html
17617 bytes
0644
release-9-1-2.html
21571 bytes
0644
release-9-1-20.html
17541 bytes
0644
release-9-1-21.html
7601 bytes
0644
release-9-1-22.html
7258 bytes
0644
release-9-1-23.html
12653 bytes
0644
release-9-1-24.html
8731 bytes
0644
release-9-1-3.html
21153 bytes
0644
release-9-1-4.html
16018 bytes
0644
release-9-1-5.html
14042 bytes
0644
release-9-1-6.html
9521 bytes
0644
release-9-1-7.html
14941 bytes
0644
release-9-1-8.html
10154 bytes
0644
release-9-1-9.html
12679 bytes
0644
release-9-1.html
78963 bytes
0644
release-9-2-1.html
7111 bytes
0644
release-9-2-10.html
32368 bytes
0644
release-9-2-11.html
20298 bytes
0644
release-9-2-12.html
5130 bytes
0644
release-9-2-13.html
4102 bytes
0644
release-9-2-14.html
18386 bytes
0644
release-9-2-15.html
18605 bytes
0644
release-9-2-16.html
7598 bytes
0644
release-9-2-17.html
8195 bytes
0644
release-9-2-18.html
12718 bytes
0644
release-9-2-19.html
10514 bytes
0644
release-9-2-2.html
23001 bytes
0644
release-9-2-20.html
13332 bytes
0644
release-9-2-21.html
14198 bytes
0644
release-9-2-22.html
15865 bytes
0644
release-9-2-23.html
8126 bytes
0644
release-9-2-24.html
7877 bytes
0644
release-9-2-3.html
13373 bytes
0644
release-9-2-4.html
14800 bytes
0644
release-9-2-5.html
12005 bytes
0644
release-9-2-6.html
11684 bytes
0644
release-9-2-7.html
20022 bytes
0644
release-9-2-8.html
7375 bytes
0644
release-9-2-9.html
15615 bytes
0644
release-9-2.html
79519 bytes
0644
release.html
22882 bytes
0644
resources.html
4226 bytes
0644
role-attributes.html
7855 bytes
0644
role-membership.html
8390 bytes
0644
role-removal.html
5303 bytes
0644
routine-reindex.html
3628 bytes
0644
routine-vacuuming.html
38023 bytes
0644
row-estimation-examples.html
20767 bytes
0644
rowtypes.html
23412 bytes
0644
rule-system.html
4117 bytes
0644
rules-privileges.html
11663 bytes
0644
rules-status.html
4512 bytes
0644
rules-triggers.html
9476 bytes
0644
rules-update.html
32615 bytes
0644
rules-views.html
26888 bytes
0644
rules.html
4948 bytes
0644
runtime-config-autovacuum.html
10974 bytes
0644
runtime-config-client.html
32815 bytes
0644
runtime-config-compatible.html
14827 bytes
0644
runtime-config-connection.html
23478 bytes
0644
runtime-config-custom.html
3548 bytes
0644
runtime-config-developer.html
14070 bytes
0644
runtime-config-error-handling.html
3570 bytes
0644
runtime-config-file-locations.html
6977 bytes
0644
runtime-config-locks.html
7634 bytes
0644
runtime-config-logging.html
45446 bytes
0644
runtime-config-preset.html
8710 bytes
0644
runtime-config-query.html
24950 bytes
0644
runtime-config-replication.html
18294 bytes
0644
runtime-config-resource.html
27901 bytes
0644
runtime-config-short.html
6683 bytes
0644
runtime-config-statistics.html
8616 bytes
0644
runtime-config-wal.html
27093 bytes
0644
runtime-config.html
8249 bytes
0644
runtime.html
5241 bytes
0644
seg.html
15470 bytes
0644
sepgsql.html
30829 bytes
0644
server-programming.html
9618 bytes
0644
server-shutdown.html
6469 bytes
0644
server-start.html
14217 bytes
0644
source-format.html
5133 bytes
0644
source.html
4071 bytes
0644
sourcerepo.html
3411 bytes
0644
spgist-examples.html
2703 bytes
0644
spgist-extensibility.html
31282 bytes
0644
spgist-implementation.html
8098 bytes
0644
spgist-intro.html
4323 bytes
0644
spgist.html
2966 bytes
0644
spi-examples.html
6217 bytes
0644
spi-interface-support.html
3770 bytes
0644
spi-interface.html
5998 bytes
0644
spi-memory.html
7089 bytes
0644
spi-realloc.html
3627 bytes
0644
spi-spi-connect.html
4052 bytes
0644
spi-spi-copytuple.html
3453 bytes
0644
spi-spi-cursor-close.html
3336 bytes
0644
spi-spi-cursor-fetch.html
4110 bytes
0644
spi-spi-cursor-find.html
3464 bytes
0644
spi-spi-cursor-move.html
3890 bytes
0644
spi-spi-cursor-open-with-args.html
6178 bytes
0644
spi-spi-cursor-open-with-paramlist.html
5035 bytes
0644
spi-spi-cursor-open.html
5732 bytes
0644
spi-spi-exec.html
3591 bytes
0644
spi-spi-execp.html
4866 bytes
0644
spi-spi-execute-plan-with-paramlist.html
4893 bytes
0644
spi-spi-execute-plan.html
5901 bytes
0644
spi-spi-execute-with-args.html
6221 bytes
0644
spi-spi-execute.html
12598 bytes
0644
spi-spi-finish.html
3655 bytes
0644
spi-spi-fname.html
3767 bytes
0644
spi-spi-fnumber.html
3936 bytes
0644
spi-spi-freeplan.html
3505 bytes
0644
spi-spi-freetuple.html
3277 bytes
0644
spi-spi-freetupletable.html
3628 bytes
0644
spi-spi-getargcount.html
3698 bytes
0644
spi-spi-getargtypeid.html
4141 bytes
0644
spi-spi-getbinval.html
4287 bytes
0644
spi-spi-getnspname.html
3467 bytes
0644
spi-spi-getrelname.html
3351 bytes
0644
spi-spi-gettype.html
3714 bytes
0644
spi-spi-gettypeid.html
3718 bytes
0644
spi-spi-getvalue.html
4166 bytes
0644
spi-spi-is-cursor-plan.html
4560 bytes
0644
spi-spi-keepplan.html
3884 bytes
0644
spi-spi-modifytuple.html
5631 bytes
0644
spi-spi-palloc.html
3157 bytes
0644
spi-spi-pfree.html
3275 bytes
0644
spi-spi-pop.html
2743 bytes
0644
spi-spi-prepare-cursor.html
5055 bytes
0644
spi-spi-prepare-params.html
4412 bytes
0644
spi-spi-prepare.html
7661 bytes
0644
spi-spi-push.html
3737 bytes
0644
spi-spi-returntuple.html
4097 bytes
0644
spi-spi-saveplan.html
4576 bytes
0644
spi-spi-scroll-cursor-fetch.html
4809 bytes
0644
spi-spi-scroll-cursor-move.html
4899 bytes
0644
spi-visibility.html
4152 bytes
0644
spi.html
10843 bytes
0644
sql-abort.html
4177 bytes
0644
sql-alteraggregate.html
6111 bytes
0644
sql-altercollation.html
5084 bytes
0644
sql-alterconversion.html
5170 bytes
0644
sql-alterdatabase.html
8778 bytes
0644
sql-alterdefaultprivileges.html
9407 bytes
0644
sql-alterdomain.html
11113 bytes
0644
sql-alterextension.html
11745 bytes
0644
sql-alterforeigndatawrapper.html
7378 bytes
0644
sql-alterforeigntable.html
12707 bytes
0644
sql-alterfunction.html
12845 bytes
0644
sql-altergroup.html
5239 bytes
0644
sql-alterindex.html
7655 bytes
0644
sql-alterlanguage.html
4022 bytes
0644
sql-alterlargeobject.html
3730 bytes
0644
sql-alteropclass.html
5114 bytes
0644
sql-alteroperator.html
5435 bytes
0644
sql-alteropfamily.html
13564 bytes
0644
sql-alterrole.html
13028 bytes
0644
sql-alterschema.html
4314 bytes
0644
sql-altersequence.html
13031 bytes
0644
sql-alterserver.html
5928 bytes
0644
sql-altertable.html
43543 bytes
0644
sql-altertablespace.html
5866 bytes
0644
sql-altertrigger.html
4647 bytes
0644
sql-altertsconfig.html
8126 bytes
0644
sql-altertsdictionary.html
6539 bytes
0644
sql-altertsparser.html
4257 bytes
0644
sql-altertstemplate.html
4223 bytes
0644
sql-altertype.html
11193 bytes
0644
sql-alteruser.html
4720 bytes
0644
sql-alterusermapping.html
5714 bytes
0644
sql-alterview.html
6969 bytes
0644
sql-analyze.html
10674 bytes
0644
sql-begin.html
6695 bytes
0644
sql-checkpoint.html
3758 bytes
0644
sql-close.html
4984 bytes
0644
sql-cluster.html
9404 bytes
0644
sql-commands.html
18810 bytes
0644
sql-comment.html
13799 bytes
0644
sql-commit-prepared.html
4516 bytes
0644
sql-commit.html
3992 bytes
0644
sql-copy.html
37443 bytes
0644
sql-createaggregate.html
13829 bytes
0644
sql-createcast.html
19632 bytes
0644
sql-createcollation.html
6739 bytes
0644
sql-createconversion.html
6538 bytes
0644
sql-createdatabase.html
12133 bytes
0644
sql-createdomain.html
8544 bytes
0644
sql-createextension.html
9083 bytes
0644
sql-createforeigndatawrapper.html
8059 bytes
0644
sql-createforeigntable.html
7718 bytes
0644
sql-createfunction.html
31076 bytes
0644
sql-creategroup.html
4012 bytes
0644
sql-createindex.html
25934 bytes
0644
sql-createlanguage.html
14888 bytes
0644
sql-createopclass.html
12676 bytes
0644
sql-createoperator.html
10688 bytes
0644
sql-createopfamily.html
5626 bytes
0644
sql-createrole.html
19325 bytes
0644
sql-createrule.html
12656 bytes
0644
sql-createschema.html
8319 bytes
0644
sql-createsequence.html
13862 bytes
0644
sql-createserver.html
6251 bytes
0644
sql-createtable.html
59172 bytes
0644
sql-createtableas.html
12772 bytes
0644
sql-createtablespace.html
6104 bytes
0644
sql-createtrigger.html
23175 bytes
0644
sql-createtsconfig.html
5352 bytes
0644
sql-createtsdictionary.html
5533 bytes
0644
sql-createtsparser.html
5947 bytes
0644
sql-createtstemplate.html
5437 bytes
0644
sql-createtype.html
39460 bytes
0644
sql-createuser.html
4524 bytes
0644
sql-createusermapping.html
5503 bytes
0644
sql-createview.html
10556 bytes
0644
sql-deallocate.html
3785 bytes
0644
sql-declare.html
15400 bytes
0644
sql-delete.html
11777 bytes
0644
sql-discard.html
4309 bytes
0644
sql-do.html
5204 bytes
0644
sql-drop-owned.html
5058 bytes
0644
sql-dropaggregate.html
4561 bytes
0644
sql-dropcast.html
4344 bytes
0644
sql-dropcollation.html
4409 bytes
0644
sql-dropconversion.html
4437 bytes
0644
sql-dropdatabase.html
4344 bytes
0644
sql-dropdomain.html
4257 bytes
0644
sql-dropextension.html
4785 bytes
0644
sql-dropforeigndatawrapper.html
4526 bytes
0644
sql-dropforeigntable.html
4560 bytes
0644
sql-dropfunction.html
5838 bytes
0644
sql-dropgroup.html
3047 bytes
0644
sql-dropindex.html
5182 bytes
0644
sql-droplanguage.html
4841 bytes
0644
sql-dropopclass.html
5678 bytes
0644
sql-dropoperator.html
5222 bytes
0644
sql-dropopfamily.html
5279 bytes
0644
sql-droprole.html
5158 bytes
0644
sql-droprule.html
4151 bytes
0644
sql-dropschema.html
4529 bytes
0644
sql-dropsequence.html
4367 bytes
0644
sql-dropserver.html
4265 bytes
0644
sql-droptable.html
5028 bytes
0644
sql-droptablespace.html
4585 bytes
0644
sql-droptrigger.html
4711 bytes
0644
sql-droptsconfig.html
4772 bytes
0644
sql-droptsdictionary.html
4689 bytes
0644
sql-droptsparser.html
4595 bytes
0644
sql-droptstemplate.html
4567 bytes
0644
sql-droptype.html
4463 bytes
0644
sql-dropuser.html
3181 bytes
0644
sql-dropusermapping.html
4679 bytes
0644
sql-dropview.html
4262 bytes
0644
sql-end.html
4157 bytes
0644
sql-execute.html
5073 bytes
0644
sql-explain.html
17094 bytes
0644
sql-expressions.html
47801 bytes
0644
sql-fetch.html
14251 bytes
0644
sql-grant.html
29245 bytes
0644
sql-insert.html
12860 bytes
0644
sql-keywords-appendix.html
106534 bytes
0644
sql-listen.html
5903 bytes
0644
sql-load.html
4207 bytes
0644
sql-lock.html
11869 bytes
0644
sql-move.html
4984 bytes
0644
sql-notify.html
10948 bytes
0644
sql-prepare-transaction.html
8640 bytes
0644
sql-prepare.html
9181 bytes
0644
sql-reassign-owned.html
5344 bytes
0644
sql-reindex.html
11103 bytes
0644
sql-release-savepoint.html
5005 bytes
0644
sql-reset.html
4993 bytes
0644
sql-revoke.html
14879 bytes
0644
sql-rollback-prepared.html
4627 bytes
0644
sql-rollback-to.html
6401 bytes
0644
sql-rollback.html
3996 bytes
0644
sql-savepoint.html
5605 bytes
0644
sql-security-label.html
8879 bytes
0644
sql-select.html
79544 bytes
0644
sql-selectinto.html
7634 bytes
0644
sql-set-constraints.html
7068 bytes
0644
sql-set-role.html
6915 bytes
0644
sql-set-session-authorization.html
6062 bytes
0644
sql-set-transaction.html
12696 bytes
0644
sql-set.html
12057 bytes
0644
sql-show.html
6851 bytes
0644
sql-start-transaction.html
4983 bytes
0644
sql-syntax-calling-funcs.html
8080 bytes
0644
sql-syntax-lexical.html
43370 bytes
0644
sql-syntax.html
5430 bytes
0644
sql-truncate.html
9364 bytes
0644
sql-unlisten.html
4923 bytes
0644
sql-update.html
15669 bytes
0644
sql-vacuum.html
10669 bytes
0644
sql-values.html
10640 bytes
0644
sql.html
13569 bytes
0644
ssh-tunnels.html
6263 bytes
0644
ssl-tcp.html
13477 bytes
0644
sslinfo.html
7594 bytes
0644
standby-settings.html
5427 bytes
0644
storage-file-layout.html
12936 bytes
0644
storage-fsm.html
3821 bytes
0644
storage-init.html
2760 bytes
0644
storage-page-layout.html
13891 bytes
0644
storage-toast.html
11478 bytes
0644
storage-vm.html
3540 bytes
0644
storage.html
2952 bytes
0644
stylesheet.css
1538 bytes
0644
supported-platforms.html
5042 bytes
0644
tablefunc.html
32193 bytes
0644
tcn.html
4974 bytes
0644
test-parser.html
4530 bytes
0644
textsearch-configuration.html
6257 bytes
0644
textsearch-controls.html
26966 bytes
0644
textsearch-debugging.html
17227 bytes
0644
textsearch-dictionaries.html
31261 bytes
0644
textsearch-features.html
21310 bytes
0644
textsearch-indexes.html
7387 bytes
0644
textsearch-intro.html
18453 bytes
0644
textsearch-limitations.html
3859 bytes
0644
textsearch-migration.html
5034 bytes
0644
textsearch-parsers.html
9210 bytes
0644
textsearch-psql.html
9345 bytes
0644
textsearch-tables.html
9750 bytes
0644
textsearch.html
5878 bytes
0644
transaction-iso.html
27240 bytes
0644
trigger-datachanges.html
5072 bytes
0644
trigger-definition.html
15507 bytes
0644
trigger-example.html
7749 bytes
0644
trigger-interface.html
10719 bytes
0644
triggers.html
3798 bytes
0644
tsearch2.html
9950 bytes
0644
tutorial-accessdb.html
7040 bytes
0644
tutorial-advanced-intro.html
3341 bytes
0644
tutorial-advanced.html
2856 bytes
0644
tutorial-agg.html
7594 bytes
0644
tutorial-arch.html
4852 bytes
0644
tutorial-concepts.html
3839 bytes
0644
tutorial-conclusion.html
2849 bytes
0644
tutorial-createdb.html
9200 bytes
0644
tutorial-delete.html
3517 bytes
0644
tutorial-fk.html
4422 bytes
0644
tutorial-inheritance.html
6137 bytes
0644
tutorial-install.html
4522 bytes
0644
tutorial-join.html
9685 bytes
0644
tutorial-populate.html
4839 bytes
0644
tutorial-select.html
8033 bytes
0644
tutorial-sql-intro.html
4904 bytes
0644
tutorial-sql.html
3060 bytes
0644
tutorial-start.html
2629 bytes
0644
tutorial-table.html
5704 bytes
0644
tutorial-transactions.html
9948 bytes
0644
tutorial-update.html
3159 bytes
0644
tutorial-views.html
3375 bytes
0644
tutorial-window.html
12481 bytes
0644
tutorial.html
5209 bytes
0644
typeconv-func.html
12170 bytes
0644
typeconv-oper.html
14907 bytes
0644
typeconv-overview.html
8301 bytes
0644
typeconv-query.html
5450 bytes
0644
typeconv-union-case.html
6612 bytes
0644
typeconv.html
3721 bytes
0644
unaccent.html
6742 bytes
0644
unsupported-features-sql-standard.html
35115 bytes
0644
upgrading.html
12795 bytes
0644
user-manag.html
3983 bytes
0644
using-explain.html
41824 bytes
0644
uuid-ossp.html
7228 bytes
0644
vacuumlo.html
7548 bytes
0644
view-pg-available-extension-versions.html
4642 bytes
0644
view-pg-available-extensions.html
3944 bytes
0644
view-pg-cursors.html
5669 bytes
0644
view-pg-group.html
3897 bytes
0644
view-pg-indexes.html
4155 bytes
0644
view-pg-locks.html
14444 bytes
0644
view-pg-prepared-statements.html
5060 bytes
0644
view-pg-prepared-xacts.html
4912 bytes
0644
view-pg-roles.html
6073 bytes
0644
view-pg-rules.html
3999 bytes
0644
view-pg-seclabels.html
5123 bytes
0644
view-pg-settings.html
10600 bytes
0644
view-pg-shadow.html
5381 bytes
0644
view-pg-stats.html
8887 bytes
0644
view-pg-tables.html
4836 bytes
0644
view-pg-timezone-abbrevs.html
3860 bytes
0644
view-pg-timezone-names.html
4177 bytes
0644
view-pg-user-mappings.html
5165 bytes
0644
view-pg-user.html
4517 bytes
0644
view-pg-views.html
3853 bytes
0644
views-overview.html
6542 bytes
0644
wal-async-commit.html
9016 bytes
0644
wal-configuration.html
14960 bytes
0644
wal-internals.html
6151 bytes
0644
wal-intro.html
5534 bytes
0644
wal-reliability.html
11479 bytes
0644
wal.html
2928 bytes
0644
warm-standby-failover.html
6102 bytes
0644
warm-standby.html
34646 bytes
0644
xaggr.html
9902 bytes
0644
xfunc-c.html
78520 bytes
0644
xfunc-internal.html
4004 bytes
0644
xfunc-overload.html
5911 bytes
0644
xfunc-pl.html
2991 bytes
0644
xfunc-sql.html
38027 bytes
0644
xfunc-volatility.html
9839 bytes
0644
xfunc.html
4518 bytes
0644
xindex.html
44593 bytes
0644
xml2.html
16900 bytes
0644
xoper-optimization.html
23144 bytes
0644
xoper.html
4835 bytes
0644
xplang-install.html
11127 bytes
0644
xplang.html
4235 bytes
0644
xtypes.html
12114 bytes
0644
N4ST4R_ID | Naxtarrr