A private email I received indicated that our documentation about
ignoring trailing spaces in CHAR() comparisons was slightly inaccurate. 
I have update our docs to indicate it is only non-pattern comparisons
that ignore spaces with CHAR().  Applied doc patch attached.

-- 
  Bruce Momjian  <[email protected]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index b8f6e23..22d4c4e 100644
*** a/doc/src/sgml/datatype.sgml
--- b/doc/src/sgml/datatype.sgml
*************** SELECT '52093.89'::money::numeric::float
*** 1014,1024 ****
      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>,
      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.
     </para>
  
     <para>
--- 1014,1026 ----
      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 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, and
!     when using pattern matching comparisons, e.g. <literal>LIKE</>,
!     regular expressions.
     </para>
  
     <para>
-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Reply via email to