Re: CHAR(n) always trims trailing spaces in 7.4
scott.marlowe <scott.marlowe@ihs.com>
From: "scott.marlowe" <scott.marlowe@ihs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: elein <elein@varlena.com>, "news.postgresql.org" <jlim@natsoft.com.my>, <pgsql-sql@postgresql.org>
Date: 2004-02-18T00:07:24Z
Lists: pgsql-hackers, pgsql-sql
On Tue, 17 Feb 2004, Tom Lane wrote: > elein <elein@varlena.com> writes: > > This is an example of the problem. It used to expand > > the middle thing to 15. > > > elein=# select 'x' || ' '::char(15) || 'x'; > > ?column? > > ---------- > > xx > > (1 row) > > Still does, but then the spaces go away again when the value goes into > the concatenation, because concatenation is a text operator. But then this: select 'x'||' '||'x' should produce xx, but it produces x x.