Re: CHAR(n) always trims trailing spaces in 7.4 - Mailing list pgsql-sql

From scott.marlowe
Subject Re: CHAR(n) always trims trailing spaces in 7.4
Date
Msg-id Pine.LNX.4.33.0402171706530.31955-100000@css120.ihs.com
Whole thread Raw
In response to Re: CHAR(n) always trims trailing spaces in 7.4  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CHAR(n) always trims trailing spaces in 7.4
Re: CHAR(n) always trims trailing spaces in 7.4
Re: CHAR(n) always trims trailing spaces in 7.4
List 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.



pgsql-sql by date:

Previous
From: elein
Date:
Subject: Re: CHAR(n) always trims trailing spaces in 7.4
Next
From: Tom Lane
Date:
Subject: Re: CHAR(n) always trims trailing spaces in 7.4