Re: CHAR(n) always trims trailing spaces in 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: elein <elein(at)varlena(dot)com>
Cc: "news(dot)postgresql(dot)org" <jlim(at)natsoft(dot)com(dot)my>, pgsql-sql(at)postgresql(dot)org
Subject: Re: CHAR(n) always trims trailing spaces in 7.4
Date: 2004-02-17 23:40:49
Message-ID: 18872.1077061249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

elein <elein(at)varlena(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message elein 2004-02-17 23:56:11 Re: CHAR(n) always trims trailing spaces in 7.4
Previous Message elein 2004-02-17 23:17:28 Re: CHAR(n) always trims trailing spaces in 7.4

Browse pgsql-sql by date

  From Date Subject
Next Message elein 2004-02-17 23:56:11 Re: CHAR(n) always trims trailing spaces in 7.4
Previous Message Tom Lane 2004-02-17 23:33:54 Re: Return relation table data in a single value CSV