diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 960342973ce..4f832a76aad 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1534,11 +1534,12 @@
text
- Remove the longest string containing only the
+ Remove the longest string containing only characters from
characters (a space by default) from the
- start/end/both ends of the string
+ start, end, or both ends (both> is the default)
+ of string
- trim(both 'x' from 'xTomxx')
+ trim(both 'xyz' from 'yxTomxx')
Tom
@@ -1547,14 +1548,14 @@
trim(leading | trailing
| both from
string
- , characters
+ , characters
)
text
- Non-standard version of trim()>
+ Non-standard syntax for trim()>
- trim(both from 'xTomxx', 'x')
+ trim(both from 'yxTomxx', 'xyz')
Tom
@@ -1626,7 +1627,7 @@
in characters (a space by default)
from the start and end of string
- btrim('xyxtrimyyx', 'xy')
+ btrim('xyxtrimyyx', 'xyz')
trim
@@ -1895,8 +1896,8 @@
characters (a space by default) from the start of
string
- ltrim('zzzytrim', 'xyz')
- trim
+ ltrim('zzzytest', 'xyz')
+ test
@@ -2201,8 +2202,8 @@
characters (a space by default) from the end of
string
- rtrim('trimxxxx', 'x')
- trim
+ rtrim('testxxzx', 'xyz')
+ test
@@ -3467,11 +3468,11 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
bytea
- Remove the longest string containing only the bytes in
+ Remove the longest string containing only bytes appearing in
bytes from the start
and end of string
- trim(E'\\000'::bytea from E'\\000Tom\\000'::bytea)
+ trim(E'\\000\\001'::bytea from E'\\000Tom\\001'::bytea)
Tom
@@ -3510,11 +3511,11 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
bytea
- Remove the longest string consisting only of bytes
- in bytes from the start and end of
+ Remove the longest string containing only bytes appearing in
+ bytes from the start and end of
string
- btrim(E'\\000trim\\000'::bytea, E'\\000'::bytea)
+ btrim(E'\\000trim\\001'::bytea, E'\\000\\001'::bytea)
trim