pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: elein <elein@varlena.com>
Cc: news.postgresql.org <jlim@natsoft.com.my>
Cc: pgsql-sql@postgresql.org
Subject: Re: CHAR(n) always trims trailing spaces in 7.4
Date: Tue, 17 Feb 2004 18:40:49 -0500
Message-ID: <18872.1077061249@sss.pgh.pa.us> (raw)
In-Reply-To: <20040217151728.E25537@cookie.varlena.com>
References: <20040212000610.13913.qmail@web60806.mail.yahoo.com>
	<c0pdei$ho6$1@news.hub.org>
	<18611.1077059456@sss.pgh.pa.us>
	<20040217151728.E25537@cookie.varlena.com>

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



view thread (17+ messages)  latest in thread

Message-ID: <18872.1077061249@sss.pgh.pa.us>
Permalink:  ../18872.1077061249@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18872.1077061249@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, elein@varlena.com, jlim@natsoft.com.my
  Subject: Re: CHAR(n) always trims trailing spaces in 7.4
  In-Reply-To: <18872.1077061249@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox