Re: CHAR(n) always trims trailing spaces in 7.4
elein <elein@varlena.com>
From: elein <elein@varlena.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: elein <elein@varlena.com>, "scott.marlowe" <scott.marlowe@ihs.com>, "news.postgresql.org" <jlim@natsoft.com.my>, pgsql-sql@postgresql.org
Date: 2004-02-18T20:05:47Z
Lists: pgsql-hackers, pgsql-sql
So exactly what is the order of casts that produces different results with: 'x' || ' ' || 'x' and 'x' || ' '::char15 || 'x' Are operators being invoked both (text,text)? I'm trying to understand the precedence that causes the different results. elein On Tue, Feb 17, 2004 at 10:53:17PM -0500, Tom Lane wrote: > elein <elein@varlena.com> writes: > > Apparently the ::char is cast to varchar and then text? > > No, directly to text, because the || operator is defined as taking text > inputs. But there's no practical difference between text and varchar on > this point. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org