X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A79E6D1DD2C for ; Wed, 18 Feb 2004 00:16:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 07409-06 for ; Tue, 17 Feb 2004 20:16:50 -0400 (AST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 85B32D1DD51 for ; Tue, 17 Feb 2004 20:16:46 -0400 (AST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i1I0EFVo026655; Tue, 17 Feb 2004 17:14:45 -0700 (MST) Date: Tue, 17 Feb 2004 17:07:24 -0700 (MST) From: "scott.marlowe" To: Tom Lane Cc: elein , "news.postgresql.org" , Subject: Re: CHAR(n) always trims trailing spaces in 7.4 In-Reply-To: <18872.1077061249@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/235 X-Sequence-Number: 16925 On Tue, 17 Feb 2004, Tom Lane wrote: > elein 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.