Re: || operator - Mailing list pgsql-general

From Adrian Klaver
Subject Re: || operator
Date
Msg-id 54071E33.7010807@aklaver.com
Whole thread Raw
In response to Re: || operator  (Szymon Guz <mabewlun@gmail.com>)
List pgsql-general
On 09/03/2014 06:25 AM, Szymon Guz wrote:
>

>
>
>
> Hi Pavel,
> I think we should have this in core, as this definitely is a bug.

It is documented behavior:

http://www.postgresql.org/docs/9.3/interactive/datatype-character.html

"Values of type character are physically padded with spaces to the
specified width 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 character, and
they will be removed when converting a character value to one of the
other string types. Note that trailing spaces are semantically
significant in character varying and text values, and when using pattern
matching, e.g. LIKE, regular expressions."


>
> Szymon


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: || operator
Next
From: Kevin Grittner
Date:
Subject: Re: || operator