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

From Tom Lane
Subject Re: CHAR(n) always trims trailing spaces in 7.4
Date
Msg-id 18872.1077061249@sss.pgh.pa.us
Whole thread Raw
In response to Re: CHAR(n) always trims trailing spaces in 7.4  (elein <elein@varlena.com>)
Responses Re: CHAR(n) always trims trailing spaces in 7.4  (elein <elein@varlena.com>)
Re: CHAR(n) always trims trailing spaces in 7.4  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-sql
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.
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Return relation table data in a single value CSV
Next
From: elein
Date:
Subject: Re: CHAR(n) always trims trailing spaces in 7.4