]> granicus.if.org Git - postgresql/commitdiff
Document that char() ignores spaces in non-pattern comparisons, not in
authorBruce Momjian <bruce@momjian.us>
Tue, 8 Mar 2011 16:03:02 +0000 (11:03 -0500)
committerBruce Momjian <bruce@momjian.us>
Tue, 8 Mar 2011 16:03:40 +0000 (11:03 -0500)
pattern comparisons such as LIKE and regex.

doc/src/sgml/datatype.sgml

index b8f6e238f0b547e3cbebd5569a8a3ccd58024140..22d4c4e33a983e2b62335321b63c7c7863cff906 100644 (file)
@@ -1014,11 +1014,13 @@ SELECT '52093.89'::money::numeric::float8;
     with spaces to the specified width <replaceable>n</>, and are
     stored and displayed that way.  However, the padding spaces are
     treated as semantically insignificant.  Trailing spaces are
-    disregarded when comparing two values of type <type>character</type>,
+    disregarded when non-pattern comparing two values of type <type>character</type>,
     and they will be removed when converting a <type>character</type> value
     to one of the other string types.  Note that trailing spaces
     <emphasis>are</> semantically significant in
-    <type>character varying</type> and <type>text</type> values.
+    <type>character varying</type> and <type>text</type> values, and
+    when using pattern matching comparisons, e.g. <literal>LIKE</>,
+    regular expressions.
    </para>
 
    <para>