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 CALQQPTeL=9syDfDEO=wRs8u-vYwV3WP9t2bLVt85Ph4OhQ8hMw@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14800: substring produces different results with similar types  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #14800: substring produces different results with similar types
Re: [BUGS] BUG #14800: substring produces different results withsimilar types
List pgsql-bugs
But documentation says different. So this behaviour is unxpected. 

6 сент. 2017 г. 5:51 PM пользователь "Tom Lane" <tgl@sss.pgh.pa.us> написал:
Francisco Olarte <folarte@peoplecall.com> writes:
> Anyway, you may notice char() discards trailing blanks, varchar does not:

More precisely, converting from char(n) to varchar or text discards
trailing blanks.  Since both substring() and the || operator take
text argument types, an implicit coercion to text is happening in
these examples ... and that's where the blanks went.

                        regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14800: substring produces different results with similar types
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14800: substring produces different results with similar types