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 2196ED1D1CD for ; Tue, 17 Feb 2004 23:40:52 +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 95417-05 for ; Tue, 17 Feb 2004 19:40:53 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D2E8BD1B484 for ; Tue, 17 Feb 2004 19:40:49 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1HNenxL018873; Tue, 17 Feb 2004 18:40:49 -0500 (EST) To: elein Cc: "news.postgresql.org" , pgsql-sql@postgresql.org Subject: Re: CHAR(n) always trims trailing spaces in 7.4 In-reply-to: <20040217151728.E25537@cookie.varlena.com> References: <20040212000610.13913.qmail@web60806.mail.yahoo.com> <18611.1077059456@sss.pgh.pa.us> <20040217151728.E25537@cookie.varlena.com> Comments: In-reply-to elein message dated "Tue, 17 Feb 2004 15:17:28 -0800" Date: Tue, 17 Feb 2004 18:40:49 -0500 Message-ID: <18872.1077061249@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/233 X-Sequence-Number: 16923 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. regards, tom lane