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 34019D1D3DC for ; Tue, 17 Feb 2004 23:10:59 +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 81465-06 for ; Tue, 17 Feb 2004 19:10:59 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D9D10D1D2E3 for ; Tue, 17 Feb 2004 19:10:56 -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 i1HNAuHW018612; Tue, 17 Feb 2004 18:10:56 -0500 (EST) To: "news.postgresql.org" Cc: pgsql-sql@postgresql.org, elein Subject: Re: CHAR(n) always trims trailing spaces in 7.4 In-reply-to: References: <20040212000610.13913.qmail@web60806.mail.yahoo.com> Comments: In-reply-to "news.postgresql.org" message dated "Mon, 16 Feb 2004 11:29:42 +0800" Date: Tue, 17 Feb 2004 18:10:56 -0500 Message-ID: <18611.1077059456@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/230 X-Sequence-Number: 16920 "news.postgresql.org" writes: > I just discovered the following change to CHAR(n) (taken from varlena.com, > general bits, issue 62). The description you quote doesn't appear to have much of anything to do with the actual behavior of 7.4. 7.4 will trim trailing spaces when converting char(n) to varchar or text, but the example query does not do that. It just coerces query output columns to char(n), and that works the same as it did before. For instance regression=# select 'zit'::char(77); bpchar ------------------------------------------------------------------------------- zit (1 row) regards, tom lane