diff options
author | Bruce Momjian <bruce@momjian.us> | 2011-03-08 11:03:02 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2011-03-08 11:03:40 -0500 |
commit | 7465ae06be4f1dbc90575d68d1ffc3351e1ca855 (patch) | |
tree | aac92b33feb247b7ecc270fe3a56b8d587f97871 | |
parent | 4ff90d9945b2e33662b2a0af2cad69ae802f2b76 (diff) | |
download | postgresql-7465ae06be4f1dbc90575d68d1ffc3351e1ca855.tar.gz postgresql-7465ae06be4f1dbc90575d68d1ffc3351e1ca855.zip |
Document that char() ignores spaces in non-pattern comparisons, not in
pattern comparisons such as LIKE and regex.
-rw-r--r-- | doc/src/sgml/datatype.sgml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index b8f6e238f0b..22d4c4e33a9 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -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> |