Re: || operator

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Vinayak <vinpokale(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: || operator
Date: 2014-09-03 13:57:07
Message-ID: 54071E33.7010807@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2014-09-03 14:01:14 Re: || operator
Previous Message Pavel Stehule 2014-09-03 13:30:00 Re: || operator