Re: BUG #14800: substring produces different results with similar types

From: Артём Костин <kostin(dot)artem(at)gmail(dot)com>
To: Francisco Olarte <folarte(at)peoplecall(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: BUG #14800: substring produces different results with similar types
Date: 2017-09-06 17:10:21
Message-ID: CALQQPTdbP5Uw=iS-3tnudZ=L27J2Cg6M1DxnS34iz4Etsyg+1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I'm sorry for this approach.

The main point is that behaviour are not applied to all character types
described in docs. You can see it in my example.

For the second point, please, check chapter 8.3 for this
"Trailing spaces are 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, that is LIKE and regular expressions."

According to the last sentence I expect spaces after characters. It would
be strange first convert character to string and when string to text type,
don't you think so?

6 сент. 2017 г. 7:46 PM пользователь "Francisco Olarte" <
folarte(at)peoplecall(dot)com> написал:

> Please, do not top-quote, it is hard to read.
>
> On Wed, Sep 6, 2017 at 5:22 PM, Артём Костин <kostin(dot)artem(at)gmail(dot)com>
> wrote:
> > But documentation says different. So this behaviour is unxpected.
>
> If you think so you may post the relevant part of the documentation,
> so we can see if it really does or try to tell you where we think you
> are reading it wrong. This hand waving approach, "docs says
> otherwise", won't help.
>
> Francisco Olarte.
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Wood, Dan 2017-09-06 17:24:23 Re: Old row version in hot chain become visible after a freeze
Previous Message Francisco Olarte 2017-09-06 16:45:44 Re: BUG #14800: substring produces different results with similar types