Re: [BUGS] BUG #14800: substring produces different results withsimilar types - Mailing list pgsql-bugs

From Артём Костин
Subject Re: [BUGS] BUG #14800: substring produces different results withsimilar types
Date
Msg-id CALQQPTdbP5Uw=iS-3tnudZ=L27J2Cg6M1DxnS34iz4Etsyg+1A@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14800: substring produces different results withsimilar types  (Francisco Olarte <folarte@peoplecall.com>)
Responses Re: [BUGS] BUG #14800: substring produces different results withsimilar types
Re: [BUGS] BUG #14800: substring produces different results withsimilar types
List 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@peoplecall.com> написал:
Please, do not top-quote, it is hard to read.

On Wed, Sep 6, 2017 at 5:22 PM, Артём Костин <kostin.artem@gmail.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.

pgsql-bugs by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: [BUGS] BUG #14800: substring produces different results withsimilar types
Next
From: "Wood, Dan"
Date:
Subject: Re: [BUGS] Old row version in hot chain become visible after a freeze