]> granicus.if.org Git - postgresql/commitdiff
Document that translate() removes characters in "from" that don't have
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 16 Oct 2010 04:11:38 +0000 (01:11 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 16 Oct 2010 04:15:10 +0000 (01:15 -0300)
a corresponding "to" character.

Author: Josh Kupershmidt

doc/src/sgml/func.sgml

index 5d422afef26b2d873859493ee9a71a56575c3366..183b72cda48476db49867bd1eea364734052e627 100644 (file)
         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>