aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2010-10-16 01:11:38 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2010-10-16 01:15:10 -0300
commit33ae03f4003adb27651d00688016d1c4a979686f (patch)
treec2f6cea87469dca7ba9fabcb1c47ff4206abd235 /doc/src
parent07f1264dda0e776a7e329b091c127059bce8cc54 (diff)
downloadpostgresql-33ae03f4003adb27651d00688016d1c4a979686f.tar.gz
postgresql-33ae03f4003adb27651d00688016d1c4a979686f.zip
Document that translate() removes characters in "from" that don't have
a corresponding "to" character. Author: Josh Kupershmidt
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 5d422afef26..183b72cda48 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1866,10 +1866,12 @@
Any character in <parameter>string</parameter> that matches a
character in the <parameter>from</parameter> set is replaced by
the corresponding character in the <parameter>to</parameter>
- set
+ set. If <parameter>from</parameter> is longer than
+ <parameter>to</parameter>, occurrences of the extra characters in
+ <parameter>from</parameter> are removed.
</entry>
- <entry><literal>translate('12345', '14', 'ax')</literal></entry>
- <entry><literal>a23x5</literal></entry>
+ <entry><literal>translate('12345', '143', 'ax')</literal></entry>
+ <entry><literal>a2x5</literal></entry>
</row>
</tbody>