From: Joachim Wieland <joe@mcknight.de>
To: pgsql-patches@postgresql.org
Subject: small doc patch for regexp_replace
Date: Thu, 18 May 2006 02:01:41 +0200
Message-ID: <20060518000141.GA5419@mcknight.de> (raw)
Is there any reason, why regexp_replace is not included in the tables of the
string functions?
http://developer.postgresql.org/docs/postgres/functions-string.html
The appended patch adds regexp_replace() and links to the pattern matching
section for substring / regexp_replace.
I noticed that in the table the declaration of the arguments is
inconsistent, for example:
lower(string)
ascii(text)
length(string text)
also in the sgml, there is sometimes "text" and sometimes
"<type>text</type>".
I'd fix that if someone told me what the preferred (if any) form is...
Joachim
Attachments:regexp_replace-doc.diff (text/plain, 3.3K) download
diff -cr cvs/pgsql/doc/src/sgml/func.sgml cvs.build/pgsql/doc/src/sgml/func.sgml
*** cvs/pgsql/doc/src/sgml/func.sgml 2006-05-15 22:59:38.000000000 +0200
--- cvs.build/pgsql/doc/src/sgml/func.sgml 2006-05-18 01:34:26.000000000 +0200
***************
*** 1112,1118 ****
<entry><literal><function>substring</function>(<parameter>string</parameter> from <replaceable>pattern</replaceable>)</literal></entry>
<entry><type>text</type></entry>
<entry>
! Extract substring matching POSIX regular expression
</entry>
<entry><literal>substring('Thomas' from '...$')</literal></entry>
<entry><literal>mas</literal></entry>
--- 1112,1120 ----
<entry><literal><function>substring</function>(<parameter>string</parameter> from <replaceable>pattern</replaceable>)</literal></entry>
<entry><type>text</type></entry>
<entry>
! Extract substring matching POSIX regular expression. See
! <xref linkend="functions-matching"> for more information on pattern
! matching.
</entry>
<entry><literal>substring('Thomas' from '...$')</literal></entry>
<entry><literal>mas</literal></entry>
***************
*** 1122,1129 ****
<entry><literal><function>substring</function>(<parameter>string</parameter> from <replaceable>pattern</replaceable> for <replaceable>escape</replaceable>)</literal></entry>
<entry><type>text</type></entry>
<entry>
! Extract substring matching <acronym>SQL</acronym> regular
! expression
</entry>
<entry><literal>substring('Thomas' from '%#"o_a#"_' for '#')</literal></entry>
<entry><literal>oma</literal></entry>
--- 1124,1132 ----
<entry><literal><function>substring</function>(<parameter>string</parameter> from <replaceable>pattern</replaceable> for <replaceable>escape</replaceable>)</literal></entry>
<entry><type>text</type></entry>
<entry>
! Extract substring matching <acronym>SQL</acronym> regular expression.
! See <xref linkend="functions-matching"> for more information on
! pattern matching.
</entry>
<entry><literal>substring('Thomas' from '%#"o_a#"_' for '#')</literal></entry>
<entry><literal>oma</literal></entry>
***************
*** 1422,1427 ****
--- 1425,1442 ----
</row>
<row>
+ <entry><literal><function>regexp_replace</function>(<parameter>string</parameter> <type>text</type>, <parameter>pattern</parameter> <type>text</type>, <parameter>replacement</parameter> <type>text</type> [,<parameter>flags</parameter> <type>text</type>])</literal></entry>+ <entry><type>text</type></entry>+ <entry>+ Replace substring matching POSIX regular expression. See+ <xref linkend="functions-matching"> for more information on pattern+ matching.+ </entry>+ <entry><literal>regexp_replace('Thomas', '.[mN]a.', 'M')</literal></entry>+ <entry><literal>ThM</literal></entry>+ </row>+ + <row>
<entry><literal><function>repeat</function>(<parameter>string</parameter> <type>text</type>, <parameter>number</parameter> <type>int</type>)</literal></entry>
<entry><type>text</type></entry>
<entry>Repeat <parameter>string</parameter> the specified
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: joe@mcknight.de, pgsql-patches@postgresql.org
Subject: Re: small doc patch for regexp_replace
In-Reply-To: <20060518000141.GA5419@mcknight.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox